ServiceDescriptionFormatExtensionCollection.Find Metoda

Definicja

Wyszukuje element ServiceDescriptionFormatExtensionCollection i zwraca pierwszy element członkowski kolekcji określony przez przekazany parametr.

Przeciążenia

Find(Type)

Wyszukuje element ServiceDescriptionFormatExtensionCollection i zwraca pierwszy element określonego pochodnego Typeelementu .

Find(String, String)

Wyszukuje ServiceDescriptionFormatExtensionCollection element członkowski o określonej nazwie i identyfikatorze URI przestrzeni nazw.

Find(Type)

Źródło:
ServiceDescription.cs
Źródło:
ServiceDescription.cs
Źródło:
ServiceDescription.cs

Wyszukuje element ServiceDescriptionFormatExtensionCollection i zwraca pierwszy element określonego pochodnego Typeelementu .

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

Parametry

type
Type

Element Type , dla którego ma być przeszukiwana kolekcja.

Zwraca

Jeśli wyszukiwanie zakończy się pomyślnie, obiekt określonego Typeobiektu ; w przeciwnym razie null.

Uwagi

Ta metoda wyszukuje kolekcję w kolejności indeksu i zwraca tylko pasujący element z indeksem o najniższej liczbie.

Dotyczy

Find(String, String)

Źródło:
ServiceDescription.cs
Źródło:
ServiceDescription.cs
Źródło:
ServiceDescription.cs

Wyszukuje ServiceDescriptionFormatExtensionCollection element członkowski o określonej nazwie i identyfikatorze URI przestrzeni nazw.

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

Parametry

name
String

Nazwa elementu do znalezienia XmlElement .

ns
String

Identyfikator URI przestrzeni nazw XML, który XmlElement ma zostać znaleziony.

Zwraca

Jeśli wyszukiwanie zakończy się pomyślnie, element XmlElement; w przeciwnym razie null.

Przykłady

// 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

Uwagi

Ta metoda wyszukuje kolekcję w kolejności indeksu i zwraca pierwszy XmlElement , który spełnia kryteria dwóch parametrów.

Dotyczy