CodeCommentStatementCollection.Insert(Int32, CodeCommentStatement) 方法

定義

在指定的索引處插入物件 CodeCommentStatement

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

參數

index
Int32

以零為基礎的索引,該項目應該插入其中。

value
CodeCommentStatement

CodeCommentStatement要插入的物件。

範例

以下範例示範如何使用此 Insert 方法將物件加入 CodeCommentStatementCodeCommentStatementCollection

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

適用於

另請參閱