CodeCommentStatementCollection.Insert(Int32, CodeCommentStatement) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在指定的索引處插入物件 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"))