Condividi tramite


OperationCollection.Contains(Operation) Metodo

Definizione

Restituisce un valore che indica se l'oggetto Operation specificato è un membro di 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

Parametri

operation
Operation

Oggetto Operation di cui verificare l'appartenenza all'insieme.

Restituisce

true se operation è un membro di OperationCollection; in caso contrario, false.

Esempio

Nell'esempio seguente viene illustrato l'uso del metodo 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

Si applica a