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该方法将对象添加到 CodeCommentStatement .CodeCommentStatementCollection

// 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"))

适用于

另请参阅