Condividi tramite


ServiceDescriptionFormatExtensionCollection.FindAll Metodo

Definizione

Cerca nell'insieme ServiceDescriptionFormatExtensionCollection tutti i membri dell'insieme specificato dal parametro passato.

Overload

FindAll(Type)

Cerca l'insieme ServiceDescriptionFormatExtensionCollection e restituisce una matrice di tutti gli elementi dell'oggetto Type specificato.

FindAll(String, String)

Cerca l'insieme ServiceDescriptionFormatExtensionCollection e restituisce una matrice di tutti i membri con il nome e l'URI dello spazio dei nomi specificati.

FindAll(Type)

Cerca l'insieme ServiceDescriptionFormatExtensionCollection e restituisce una matrice di tutti gli elementi dell'oggetto Type specificato.

public:
 cli::array <System::Object ^> ^ FindAll(Type ^ type);
public object[] FindAll (Type type);
member this.FindAll : Type -> obj[]
Public Function FindAll (type As Type) As Object()

Parametri

type
Type

Oggetto Type da cercare nell'insieme.

Restituisce

Object[]

Matrice di istanze di Object che rappresentano tutti i membri predefiniti del tipo specificato.

Esempio

// 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.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());
' 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())

Commenti

Nota

La matrice restituita è vuota se la ricerca non riesce.

Si applica a

FindAll(String, String)

Cerca l'insieme ServiceDescriptionFormatExtensionCollection e restituisce una matrice di tutti i membri con il nome e l'URI dello spazio dei nomi specificati.

public:
 cli::array <System::Xml::XmlElement ^> ^ FindAll(System::String ^ name, System::String ^ ns);
public System.Xml.XmlElement[] FindAll (string name, string ns);
member this.FindAll : string * string -> System.Xml.XmlElement[]
Public Function FindAll (name As String, ns As String) As XmlElement()

Parametri

name
String

Attributo XML del nome degli oggetti XmlElement da trovare.

ns
String

Attributo dell'URI dello spazio dei nomi XML degli oggetti XmlElement da trovare.

Restituisce

XmlElement[]

Matrice di istanze di XmlElement.

Commenti

Nota

La matrice restituita è vuota se la ricerca non riesce.

Si applica a