CodeAttributeArgumentCollection.Insert(Int32, CodeAttributeArgument) Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Wstawia określony CodeAttributeArgument obiekt do kolekcji w określonym indeksie.
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
Indeks oparty na zera, w którym należy wstawić określony obiekt.
- value
- CodeAttributeArgument
Obiekt CodeAttributeArgument do wstawienia.
Przykłady
W poniższym przykładzie pokazano, jak za pomocą Insert metody dodać CodeAttributeArgument obiekt do obiektu 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)))