OperationCollection.Contains(Operation) Methode

Definitie

Retourneert een waarde die aangeeft of de opgegeven Operation lid is van de 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

Parameters

operation
Operation

Het Operation abonnement waarvoor u het lidmaatschap van de verzameling wilt controleren.

Retouren

trueals operation lid is van de OperationCollection; anders . false

Voorbeelden

In het volgende voorbeeld ziet u het gebruik van de methode Contains.

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

Van toepassing op