OperationCollection.Insert(Int32, Operation) Yöntem

Tanım

Belirtilen OperationOperationCollection değerini belirtilen sıfır tabanlı dizine ekler.

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

Parametreler

index
Int32

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

operation
Operation

Operation koleksiyonuna eklenecek.

Örnekler

Aşağıdaki örnekte yönteminin kullanımı gösterilmektedir Insert .

myOperationCollection->Remove( myOperation );

// Insert the 'myOpearation' operation at the index '0'.
myOperationCollection->Insert( 0, myOperation );
Console::WriteLine( "The operation at index '0' is : {0}", myOperationCollection[ 0 ]->Name );
myOperationCollection.Remove(myOperation);
// Insert the 'myOpearation' operation at the index '0'.
myOperationCollection.Insert(0, myOperation);
Console.WriteLine("The operation at index '0' is : " +
                  myOperationCollection[0].Name);
myOperationCollection.Remove(myOperation)
' Insert the 'myOpearation' operation at the index '0'.
myOperationCollection.Insert(0, myOperation)
Console.WriteLine("The operation at index '0' is : " + _
                  myOperationCollection.Item(0).Name)

Açıklamalar

Koleksiyondaki öğe sayısı zaten koleksiyonun kapasitesine eşitse, yeni öğe eklenmeden önce iç dizi otomatik olarak yeniden yerleştirilerek kapasite ikiye katlanır.

index parametresi değerine Countoperation eşitse, parametresi sonuna eklenirOperationCollection.

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

Şunlara uygulanır