ServiceDescriptionFormatExtensionCollection.FindAll Method (Type)
.NET Framework 3.0
Searches the ServiceDescriptionFormatExtensionCollection and returns an array of all elements of the specified Type.
Namespace: System.Web.Services.Description
Assembly: System.Web.Services (in system.web.services.dll)
Assembly: System.Web.Services (in system.web.services.dll)
// Check all elements of type 'SoapBinding' in collection. array<Object^>^myObjectArray1 = gcnew array<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, mySoapBinding1->GetType() );
// Check all elements of type 'SoapBinding' in collection.
Object myObjectArray1[] = new Object[myCollection.get_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()).Equals(myIEnumerator.get_Current().
GetType())) {
myNumberOfElements++;
}
}
Console.WriteLine("Collection contains {0} objects of type '{1}'.",
System.Convert.ToString(myNumberOfElements),
System.Convert.ToString(mySoapBinding1.GetType()));
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show:
Note: