OperationBindingCollection.Insert(Int32, OperationBinding) 메서드

정의

지정된 OperationBinding 인스턴스를 OperationBindingCollection의 지정된 인덱스 위치(0부터 시작)에 추가합니다.

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)

매개 변수

index
Int32

bindingOperation 매개 변수를 삽입할 인덱스(0부터 시작)입니다.

bindingOperation
OperationBinding

컬렉션에 추가할 OperationBinding입니다.

예제

다음 예제에서는 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())

설명

컬렉션에 이미 있는 항목의 수가 컬렉션의 용량을 자동으로 새 요소를 삽입 하기 전에 내부 배열을 다시 할당 하 여 용량 배가 됩니다.

경우는 index 매개 변수 값과 같음 CountbindingOperation 매개 변수 끝에 추가 됩니다는 OperationBindingCollection합니다.

삽입 지점 뒤에 있는 요소는 새 요소를 수용 하도록 아래로 이동 합니다.

적용 대상