This documentation is archived and is not being maintained.
OperationBindingCollection.IndexOf Method
.NET Framework 1.1
Searches for the specified OperationBinding and returns the zero-based index of the first occurrence within the collection.
[Visual Basic] Public Function IndexOf( _ ByVal bindingOperation As OperationBinding _ ) As Integer [C#] public int IndexOf( OperationBinding bindingOperation ); [C++] public: int IndexOf( OperationBinding* bindingOperation ); [JScript] public function IndexOf( bindingOperation : OperationBinding ) : int;
Parameters
- bindingOperation
- The OperationBinding for which to search in the collection.
Return Value
A 32-bit signed integer.
Example
[Visual Basic, C#, C++] The following example demonstrates the use of the Insert method.
[Visual Basic] ' 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()) [C#] // 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); [C++] // Insert the OperationBinding of the Add operation at index 0. myOperationBindingCollection->Insert(0, addOperationBinding); Console::WriteLine(S"\nInserted the OperationBinding of the " S"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(S"\nThe index of the OperationBinding of the Add operation : {0}", __box(index));
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
OperationBindingCollection Class | OperationBindingCollection Members | System.Web.Services.Description Namespace
Show: