ServiceDescriptionFormatExtensionCollection::FindAll Method (Type^)
.NET Framework (current version)
Searches the ServiceDescriptionFormatExtensionCollection and returns an array of all elements of the specified Type.
Assembly: System.Web.Services (in System.Web.Services.dll)
Parameters
- type
-
Type:
System::Type^
A Type for which to search the collection.
Return Value
Type: array<System::Object^>^An array of Object instances representing all collection members of the specified type.
Note |
|---|
The array returned is empty if the search is unsuccessful. |
// 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() );
.NET Framework
Available since 1.1
Available since 1.1
Show:
