CodeStatementCollection.Insert(Int32, CodeStatement) 메서드

정의

지정된 CodeStatement 인덱스의 컬렉션에 지정된 개체를 삽입합니다.

public:
 void Insert(int index, System::CodeDom::CodeStatement ^ value);
public void Insert(int index, System.CodeDom.CodeStatement value);
member this.Insert : int * System.CodeDom.CodeStatement -> unit
Public Sub Insert (index As Integer, value As CodeStatement)

매개 변수

index
Int32

지정된 개체를 삽입해야 하는 인덱스(0부터 시작)입니다.

value
CodeStatement

CodeStatement 삽입할 개체입니다.

예제

다음 예제에서는 메서드를 사용하여 Insert 개체를 CodeStatement 추가하는 방법을 보여 줍니다 CodeStatementCollection.

// Inserts a CodeStatement at index 0 of the collection.
collection.Insert( 0, new CodeCommentStatement("Test comment statement") );
' Inserts a CodeStatement at index 0 of the collection.
collection.Insert(0, New CodeCommentStatement("Test comment statement"))

적용 대상

추가 정보