OperationBindingCollection.Insert Method
Assembly: System.Web.Services (in system.web.services.dll)
public void Insert ( int index, OperationBinding bindingOperation )
public function Insert ( index : int, bindingOperation : OperationBinding )
Not applicable.
Parameters
- index
The zero-based index at which to insert the bindingOperation parameter.
- bindingOperation
The OperationBinding to add to the collection.
If the number of items in the collection already equals the collection's capacity, the capacity is doubled by automatically reallocating the internal array before the new element is inserted.
If the index parameter is equal to Count, the bindingOperation parameter is added to the end of the OperationBindingCollection.
The elements after the insertion point move down to accommodate the new element.
The following example demonstrates the use of the Insert method.
// 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);
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.