OperationBindingCollection.Insert(Int32, OperationBinding) Yöntem

Tanım

Belirtilen örneği OperationBindingCollection belirtilen OperationBinding sıfır tabanlı dizine ekler.

public:
 void Insert(int index, System::Web::Services::Description::OperationBinding ^ bindingOperation);
public void Insert (int index, System.Web.Services.Description.OperationBinding bindingOperation);
member this.Insert : int * System.Web.Services.Description.OperationBinding -> unit
Public Sub Insert (index As Integer, bindingOperation As OperationBinding)

Parametreler

index
Int32

Parametresinin bindingOperation eklendiği sıfır tabanlı dizin.

bindingOperation
OperationBinding

OperationBinding koleksiyonuna eklenecek öğesini seçin.

Örnekler

Aşağıdaki örnekte yönteminin kullanımı gösterilmektedir 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())

Açıklamalar

Koleksiyondaki öğe sayısı zaten koleksiyonun kapasitesine eşitse, yeni öğe eklenmeden önce iç dizi otomatik olarak yeniden yerleştirilerek kapasite iki katına çıkılır.

index parametresi değerine eşitseCountbindingOperation, parametresi sonuna OperationBindingCollectioneklenir.

Ekleme noktasından sonraki öğeler, yeni öğeye uyum sağlamak için aşağı taşınır.

Şunlara uygulanır