CodeAttributeArgumentCollection.Insert(Int32, CodeAttributeArgument) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將指定的 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
以零為基礎的索引,應該插入指定的物件。
- value
- CodeAttributeArgument
CodeAttributeArgument要插入的物件。
範例
以下範例示範如何使用此 Insert 方法將物件加入 CodeAttributeArgumentCodeAttributeArgumentCollection。
// 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)))