Compartir vía


ServiceDescriptionFormatExtensionCollection.Find Método

Definición

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

Sobrecargas

Find(Type)

Busca ServiceDescriptionFormatExtensionCollection y devuelve el primer elemento del objeto Type derivado especificado.

Find(String, String)

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

Find(Type)

Busca ServiceDescriptionFormatExtensionCollection y devuelve el primer elemento del objeto Type derivado especificado.

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 que se va a buscar en la colección.

Devoluciones

Object

Si la búsqueda se realiza con éxito, objeto del Type especificado; en caso contrario null.

Comentarios

Este método busca en 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)

Busca en ServiceDescriptionFormatExtensionCollection un miembro con el nombre y el identificador URI del 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 buscar.

ns
String

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

Devoluciones

XmlElement

Si la búsqueda se realiza con éxito, XmlElement; en 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