ServiceDescriptionFormatExtensionCollection.FindAll Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
ServiceDescriptionFormatExtensionCollection Recherche tous les membres de la collection spécifiés par le paramètre passé.
Surcharges
| Nom | Description |
|---|---|
| FindAll(Type) |
Recherche et ServiceDescriptionFormatExtensionCollection retourne un tableau de tous les éléments de l’élément spécifié Type. |
| FindAll(String, String) |
Recherche et ServiceDescriptionFormatExtensionCollection retourne un tableau de tous les membres avec le nom et l’URI d’espace de noms spécifiés. |
FindAll(Type)
Recherche et ServiceDescriptionFormatExtensionCollection retourne un tableau de tous les éléments de l’élément spécifié Type.
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()
Paramètres
Retours
Tableau d’instances Object représentant tous les membres de collection du type spécifié.
Exemples
// 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())
Remarques
Note
Le tableau retourné est vide si la recherche échoue.
S’applique à
FindAll(String, String)
Recherche et ServiceDescriptionFormatExtensionCollection retourne un tableau de tous les membres avec le nom et l’URI d’espace de noms spécifiés.
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()
Paramètres
- name
- String
Attribut de nom XML des XmlElement objets à trouver.
- ns
- String
Attribut URI de l’espace XmlElement de noms XML des objets à trouver.
Retours
Tableau d’instances XmlElement .
Remarques
Note
Le tableau retourné est vide si la recherche échoue.