OperationBindingCollection.IndexOf(OperationBinding) Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
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
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())