OperationMessageCollection.IndexOf(OperationMessage) Methode

Definitie

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

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

Parameters

operationMessage
OperationMessage

De OperationMessage zoekfunctie in de verzameling.

Retouren

De op nul gebaseerde index van het opgegeven bewerkingsbericht of -1 als het element niet in de verzameling is gevonden.

Voorbeelden

if ( myOperationMessageCollection->Contains( myOperationMessage ))
{
   int myIndex = myOperationMessageCollection->IndexOf( myOperationMessage );
   Console::WriteLine( " The index of the Add operation message in the collection is : {0}", myIndex );
}
if(myOperationMessageCollection.Contains(myOperationMessage))
{
   int myIndex =
      myOperationMessageCollection.IndexOf(myOperationMessage);
   Console.WriteLine(" The index of the Add operation " +
      "message in the collection is : " + myIndex);
}
If myOperationMessageCollection.Contains(myOperationMessage) _
   = True Then
   Dim myIndex As Integer = _
      myOperationMessageCollection.IndexOf(myOperationMessage)
   Console.WriteLine(" The index of the Add operation " & _
       "message in the collection is : " & myIndex.ToString())
End If

Van toepassing op