Lingua

ServiceDescriptionFormatExtensionCollection.Find Metodo

Definizione

Cerca in ServiceDescriptionFormatExtensionCollection e restituisce il primo membro della raccolta specificata dal parametro passato.

Overload

Nome Descrizione
Find(Type)

Cerca in ServiceDescriptionFormatExtensionCollection e restituisce il primo elemento dell'oggetto derivato specificato Type.

Find(String, String)

ServiceDescriptionFormatExtensionCollection Cerca un membro con il nome e l'URI dello spazio dei nomi specificati.

Find(Type)

Cerca in ServiceDescriptionFormatExtensionCollection e restituisce il primo elemento dell'oggetto derivato specificato Type.

public:
 System::Object ^ Find(Type ^ type);
public object Find(Type type);
member this.Find : Type -> obj
Public Function Find (type As Type) As Object

Parametri

type
Type

Oggetto Type per il quale eseguire la ricerca nella raccolta.

Valori restituiti

Se la ricerca ha esito positivo, un oggetto dell'oggetto specificato Type; in caso contrario, null.

Commenti

Questo metodo cerca la raccolta in ordine di indice e restituisce solo l'elemento corrispondente con l'indice con il numero più basso.

Si applica a

Find(String, String)

ServiceDescriptionFormatExtensionCollection Cerca un membro con il nome e l'URI dello spazio dei nomi specificati.

public:
 System::Xml::XmlElement ^ Find(System::String ^ name, System::String ^ ns);
public System.Xml.XmlElement Find(string name, string ns);
member this.Find : string * string -> System.Xml.XmlElement
Public Function Find (name As String, ns As String) As XmlElement

Parametri

name
String

Nome dell'oggetto XmlElement da trovare.

ns
String

URI dello spazio dei nomi XML dell'oggetto XmlElement da trovare.

Valori restituiti

Se la ricerca ha esito positivo, ; XmlElementin caso contrario, null.

Esempio

// Check element of type 'SoapAddressBinding' in collection.
Object^ myObj = myCollection->Find( mySoapAddressBinding->GetType() );
if ( myObj == nullptr )
      Console::WriteLine( "Element of type ' {0}' not found in collection.", mySoapAddressBinding->GetType() );
else
      Console::WriteLine( "Element of type ' {0}' found in collection.", mySoapAddressBinding->GetType() );
// Check element of type 'SoapAddressBinding' in collection.
Object   myObj = myCollection.Find(mySoapAddressBinding.GetType());
if(myObj == null)
{
   Console.WriteLine("Element of type '{0}' not found in collection.",
      mySoapAddressBinding.GetType().ToString());
}
else
{
   Console.WriteLine("Element of type '{0}' found in collection.",
      mySoapAddressBinding.GetType().ToString());
}
' Check element of type 'SoapAddressBinding' in collection.
Dim myObj As Object = myCollection.Find(mySoapAddressBinding.GetType())
If myObj Is Nothing Then
   Console.WriteLine("Element of type '{0}' not found in collection.", _
        mySoapAddressBinding.GetType().ToString())
Else
   Console.WriteLine("Element of type '{0}' found in collection.", _
        mySoapAddressBinding.GetType().ToString())
End If

Commenti

Questo metodo cerca nella raccolta in ordine di indice e restituisce il primo XmlElement che soddisfa i criteri dei due parametri.

Si applica a