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

Отсчитываемый от нуля индекс, в который следует вставить указанный объект.

value
CodeAttributeArgument

Объект для CodeAttributeArgument вставки.

Примеры

В следующем примере показано, как использовать Insert метод для добавления CodeAttributeArgument объекта в CodeAttributeArgumentCollectionобъект.

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

Применяется к