CodeAttributeArgumentCollection.Insert(Int32, CodeAttributeArgument) メソッド

定義

このコレクション内の指定したインデックス位置に、指定した CodeAttributeArgument オブジェクトを挿入します。

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

パラメーター

index
Int32

指定したオブジェクトの挿入位置を示す、0 から始まるインデックス。

value
CodeAttributeArgument

挿入する CodeAttributeArgument オブジェクト。

次の例では、 メソッドを使用 Insert して オブジェクトを CodeAttributeArgument に追加する方法を CodeAttributeArgumentCollection示します。

// Inserts a CodeAttributeArgument at index 0 of the collection.
collection->Insert( 0, gcnew CodeAttributeArgument( "Test Boolean Argument",gcnew CodePrimitiveExpression( true ) ) );
// Inserts a CodeAttributeArgument at index 0 of the collection.
collection.Insert( 0, new CodeAttributeArgument("Test Boolean Argument", new CodePrimitiveExpression(true)) );
' Inserts a CodeAttributeArgument at index 0 of the collection.
collection.Insert(0, New CodeAttributeArgument("Test Boolean Argument", New CodePrimitiveExpression(True)))

適用対象