OperationCollection.Insert(Int32, Operation) 메서드

정의

지정된 OperationOperationCollection 인덱스(0부터 시작하는 인덱스)에 지정된 값을 추가합니다.

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)

매개 변수

index
Int32

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

operation
Operation

Operation 컬렉션에 추가할 개체입니다.

예제

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

설명

컬렉션의 항목 수가 이미 컬렉션의 용량과 같으면 새 요소가 삽입되기 전에 내부 배열을 자동으로 다시 할당하여 용량을 두 배로 늘립니다.

매개 변수가 indexCount으면 매개 변수가 operation .의 OperationCollection끝에 추가됩니다.

삽입 지점 뒤의 요소는 새 요소를 수용하기 위해 아래로 이동합니다.

적용 대상