Partilhar via


OperationCollection.Contains(Operation) Método

Definição

Retorna um valor que indica se o Operation especificado é um membro do OperationCollection.

public:
 bool Contains(System::Web::Services::Description::Operation ^ operation);
public bool Contains (System.Web.Services.Description.Operation operation);
member this.Contains : System.Web.Services.Description.Operation -> bool
Public Function Contains (operation As Operation) As Boolean

Parâmetros

operation
Operation

O Operation para o qual a associação da coleção é verificada.

Retornos

Boolean

true se operation for um membro do OperationCollection; caso contrário, false.

Exemplos

O exemplo a seguir demonstra o uso do método Contains.

if ( myOperationCollection->Contains( myOperation ) == true )
{
   Console::WriteLine( "The index of the added 'myOperation' operation is : {0}", myOperationCollection->IndexOf( myOperation ) );
}
if(myOperationCollection.Contains(myOperation) == true)
{
   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

Aplica-se a