OperationCollection.Contains(Operation) Methode

Definition

Gibt einen Wert zurück, der angibt, ob es sich bei dem angegebenen Operation Element um ein Element der 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

Parameter

operation
Operation

Der Operation , für den die Sammlungsmitgliedschaft überprüft werden soll.

Gibt zurück

true if operation is a member of the OperationCollection; otherwise, false.

Beispiele

Im folgenden Beispiel wird die Verwendung der Contains-Methode gezeigt.

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

Gilt für: