OperationBindingCollection.IndexOf(OperationBinding) Metodo

Definizione

Cerca l'oggetto OperationBinding specificato e restituisce l'indice in base zero della prima occorrenza all'interno dell'insieme.

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

Parametri

bindingOperation
OperationBinding

Oggetto OperationBinding da cercare nell'insieme.

Restituisce

Int32

Intero con segno a 32 bit.

Esempio

Nell'esempio seguente viene illustrato l'uso del metodo Insert.

// Insert the OperationBinding of the Add operation at index 0.
myOperationBindingCollection->Insert( 0, addOperationBinding );
Console::WriteLine( "\nInserted the OperationBinding of the "
"Add operation in the collection." );

// Get the index of the OperationBinding of the Add
// operation from the collection.
int index = myOperationBindingCollection->IndexOf( addOperationBinding );
Console::WriteLine( "\nThe index of the OperationBinding of the Add operation : {0}", index );
// Insert the OperationBinding of the Add operation at index 0.
myOperationBindingCollection.Insert(0, addOperationBinding);
Console.WriteLine("\nInserted the OperationBinding of the " +
   "Add operation in the collection.");

// Get the index of the OperationBinding of the Add
// operation from the collection.
int index = myOperationBindingCollection.IndexOf(addOperationBinding);
Console.WriteLine("\nThe index of the OperationBinding of the " +
   "Add operation : " + index);
' Insert the OperationBinding of the Add operation at index 0.
myOperationBindingCollection.Insert(0, addOperationBinding)
Console.WriteLine(ControlChars.NewLine & _
   "Inserted the OperationBinding of the " & _
   "Add operation in the collection.")

' Get the index of the OperationBinding of the Add
' operation from the collection.
Dim index As Integer = myOperationBindingCollection.IndexOf( _
   addOperationBinding)
Console.WriteLine(ControlChars.NewLine & _
   "The index of the OperationBinding of the " & _
   "Add operation : " & index.ToString())

Si applica a