CodeAttributeArgumentCollection.Insert(Int32, CodeAttributeArgument) Metoda

Definice

Vloží zadaný CodeAttributeArgument objekt do kolekce v zadaném indexu.

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)

Parametry

index
Int32

Index založený na nule, do kterého by měl být vložen zadaný objekt.

value
CodeAttributeArgument

Objekt CodeAttributeArgument , který chcete vložit.

Příklady

Následující příklad ukazuje, jak použít metodu InsertCodeAttributeArgument přidat objekt do objektu 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)))

Platí pro