ServiceDescriptionFormatExtensionCollection.Find Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Pesquisa no ServiceDescriptionFormatExtensionCollection e retorna o primeiro membro da coleção especificado pelo parâmetro passado.
Sobrecargas
| Nome | Descrição |
|---|---|
| Find(Type) |
Pesquisa no ServiceDescriptionFormatExtensionCollection e retorna o primeiro elemento do especificado derivado Type. |
| Find(String, String) |
Procura ServiceDescriptionFormatExtensionCollection um membro com o nome e espaço de nomes especificados URI. |
Find(Type)
Pesquisa no ServiceDescriptionFormatExtensionCollection e retorna o primeiro elemento do especificado derivado 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
Parâmetros
Devoluções
Se a pesquisa for bem-sucedida, um objeto do especificado Type; caso contrário, null.
Observações
Este método pesquisa a coleção por ordem de índice e retorna apenas o elemento correspondente com o índice de menor número.
Aplica-se a
Find(String, String)
Procura ServiceDescriptionFormatExtensionCollection um membro com o nome e espaço de nomes especificados URI.
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
O nome do XmlElement que se pode encontrar.
- ns
- String
O URI do espaço de nomes XML do XmlElement a ser encontrado.
Devoluções
Se a pesquisa for bem-sucedida, um XmlElement; caso contrário, null.
Exemplos
// 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
Observações
Este método pesquisa a coleção por ordem de índice e retorna o primeiro XmlElement que cumpre os critérios dos dois parâmetros.