OperationCollection.IndexOf(Operation) Methode

Definitie

Zoekt naar de opgegeven Operation en retourneert de op nul gebaseerde index van het eerste exemplaar in de verzameling.

public:
 int IndexOf(System::Web::Services::Description::Operation ^ operation);
public int IndexOf(System.Web.Services.Description.Operation operation);
member this.IndexOf : System.Web.Services.Description.Operation -> int
Public Function IndexOf (operation As Operation) As Integer

Parameters

operation
Operation

De Operation zoekfunctie in de verzameling.

Retouren

Een 32-bits geheel getal dat is ondertekend.

Voorbeelden

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

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