ServiceDescriptionFormatExtensionCollection.FindAll メソッド
ServiceDescriptionFormatExtensionCollection 内で、渡されたパラメータによって指定されたコレクションのすべてのメンバを検索します。
オーバーロードの一覧
ServiceDescriptionFormatExtensionCollection を検索し、指定した Type のすべての要素の配列を返します。
[Visual Basic] Overloads Public Function FindAll(Type) As Object()
ServiceDescriptionFormatExtensionCollection を検索し、指定した名前と名前空間の URI を持つすべてのメンバの配列を返します。
[Visual Basic] Overloads Public Function FindAll(String, String) As XmlElement()
[JScript] public function FindAll(String, String) : XmlElement[];
使用例
[Visual Basic, C#, C++] メモ ここでは、FindAll のオーバーロード形式のうちの 1 つだけについて、使用例を示します。その他の例については、各オーバーロード形式のトピックを参照してください。
' Check all elements of type 'SoapBinding' in collection.
Dim myObjectArray1(myCollection.Count -1 ) As Object
myObjectArray1 = myCollection.FindAll(mySoapBinding1.GetType())
Dim myNumberOfElements As Integer = 0
Dim myIEnumerator As IEnumerator = myObjectArray1.GetEnumerator()
' Calculate number of elements of type 'SoapBinding'.
While myIEnumerator.MoveNext()
If mySoapBinding1.GetType() Is myIEnumerator.Current.GetType() Then
myNumberOfElements += 1
End If
End While
Console.WriteLine("Collection contains {0} objects of type '{1}'.", _
myNumberOfElements.ToString(), mySoapBinding1.GetType().ToString())
[C#]
// Check all elements of type 'SoapBinding' in collection.
Object[] myObjectArray1 = new Object[myCollection.Count];
myObjectArray1 = myCollection.FindAll(mySoapBinding1.GetType());
int myNumberOfElements = 0;
IEnumerator myIEnumerator = myObjectArray1.GetEnumerator();
// Calculate number of elements of type 'SoapBinding'.
while(myIEnumerator.MoveNext())
{
if(mySoapBinding1.GetType() == myIEnumerator.Current.GetType())
myNumberOfElements++;
}
Console.WriteLine("Collection contains {0} objects of type '{1}'.",
myNumberOfElements.ToString(),
mySoapBinding1.GetType().ToString());
[C++]
// Check all elements of type 'SoapBinding' in collection.
Object* myObjectArray1[] = new Object*[myCollection->Count];
myObjectArray1 = myCollection->FindAll(mySoapBinding1->GetType());
int myNumberOfElements = 0;
IEnumerator* myIEnumerator = myObjectArray1->GetEnumerator();
// Calculate number of elements of type 'SoapBinding'.
while(myIEnumerator->MoveNext())
if (mySoapBinding1->GetType() == myIEnumerator->Current->GetType())
myNumberOfElements++;
Console::WriteLine(S"Collection contains {0} objects of type ' {1}'.",
__box(myNumberOfElements),
mySoapBinding1->GetType());
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
参照
ServiceDescriptionFormatExtensionCollection クラス | ServiceDescriptionFormatExtensionCollection メンバ | System.Web.Services.Description 名前空間