Lenguaje

ServiceDescriptionFormatExtensionCollection.Find Método

Definición

Busca y ServiceDescriptionFormatExtensionCollection devuelve el primer miembro de la colección especificada por el parámetro pasado.

Sobrecargas

Nombre Description
Find(Type)

Busca en ServiceDescriptionFormatExtensionCollection y devuelve el primer elemento del objeto derivado Typeespecificado.

Find(String, String)

ServiceDescriptionFormatExtensionCollection Busca un miembro con el nombre y el URI de espacio de nombres especificados.

Find(Type)

Busca en ServiceDescriptionFormatExtensionCollection y devuelve el primer elemento del objeto derivado Typeespecificado.

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

Parámetros

type
Type

Type objeto para el que se va a buscar la colección.

Devoluciones

Si la búsqueda se realiza correctamente, un objeto del especificado Type; de lo contrario, nulles .

Comentarios

Este método busca la colección en orden de índice y devuelve solo el elemento coincidente con el índice con el número más bajo.

Se aplica a

Find(String, String)

ServiceDescriptionFormatExtensionCollection Busca un miembro con el nombre y el URI de espacio de nombres especificados.

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

Parámetros

name
String

Nombre del objeto XmlElement que se va a encontrar.

ns
String

Identificador URI del espacio de nombres XML que XmlElement se va a encontrar.

Devoluciones

Si la búsqueda se realiza correctamente, ; XmlElementen caso contrario, null.

Ejemplos

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

Comentarios

Este método busca en la colección en orden de índice y devuelve el primero XmlElement que cumple los criterios de los dos parámetros.

Se aplica a