OperationCollection.IndexOf(Operation) Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Pesquisa o índice especificado Operation e retorna o índice baseado em zero da primeira ocorrência dentro da coleção.
public:
int IndexOf(System::Web::Services::Description::Operation ^ operation);
public int IndexOf(System.Web.Services.Description.Operation operation);
member this.IndexOf : System.Web.Services.Description.Operation -> int
Public Function IndexOf (operation As Operation) As Integer
Parâmetros
Retornos
Um inteiro com sinal de 32 bits.
Exemplos
O exemplo a seguir demonstra o uso do método IndexOf.
if ( myOperationCollection->Contains( myOperation ))
{
Console::WriteLine( "The index of the added 'myOperation' operation is : {0}", myOperationCollection->IndexOf( myOperation ) );
}
if (myOperationCollection.Contains(myOperation))
{
Console.WriteLine("The index of the added 'myOperation' " +
"operation is : " +
myOperationCollection.IndexOf(myOperation));
}
If myOperationCollection.Contains(myOperation) = True Then
Console.WriteLine("The index of the added 'myOperation' " + _
"operation is : " + _
myOperationCollection.IndexOf(myOperation).ToString)
End If