Compartir a través de


OperationCollection.Contains(Operation) Método

Definición

Devuelve un valor que indica si el objeto Operation especificado es un miembro del objeto 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

Objeto Operation para el que se comprueba la pertenencia a la colección.

Devoluciones

Boolean

Es true si operation es un miembro de OperationCollection; en caso contrario, es false.

Ejemplos

En el siguiente ejemplo se muestra el uso del 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

Se aplica a