ServiceDescriptionFormatExtensionCollection.Find Metodo

Definizione

Cerca l'oggetto ServiceDescriptionFormatExtensionCollection e restituisce il primo membro dell'insieme specificato dal parametro passato.

Overload

Find(Type)

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

Find(String, String)

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

Find(Type)

Origine:
ServiceDescription.cs
Origine:
ServiceDescription.cs
Origine:
ServiceDescription.cs

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

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 da cercare nell'insieme.

Restituisce

Se la ricerca produce un risultato, un oggetto con attributo Type specificato; in caso contrario, null.

Commenti

Questo metodo esegue la ricerca nell'insieme in ordine di indice e restituisce solo l'elemento corrispondente con l'indice con numero più basso.

Si applica a

Find(String, String)

Origine:
ServiceDescription.cs
Origine:
ServiceDescription.cs
Origine:
ServiceDescription.cs

Cerca nella raccolta ServiceDescriptionFormatExtensionCollection 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 della classe XmlElement da ricercare.

ns
String

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

Restituisce

Se la ricerca produce un risultato, un oggetto XmlElement; in 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 esegue la ricerca nell'insieme in ordine di indice e restituisce il primo XmlElement che soddisfa i criteri dei due parametri.

Si applica a