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

項目を挿入する 0 から始まるインデックス。

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

適用対象

こちらもご覧ください