CodeAttributeArgumentCollection.Insert(Int32, CodeAttributeArgument) Metodo

Definizione

Inserisce l'oggetto specificato CodeAttributeArgument nell'insieme in corrispondenza dell'indice specificato.

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)

Parametri

index
Int32

Indice in base zero in cui deve essere inserito l'oggetto specificato.

value
CodeAttributeArgument

Oggetto CodeAttributeArgument da inserire.

Esempio

Nell'esempio seguente viene illustrato come utilizzare il Insert metodo per aggiungere un CodeAttributeArgument oggetto a un oggetto 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)))

Si applica a