CodeAttributeDeclarationCollection.Insert Metódus
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
Beszúrja a megadott CodeAttributeDeclaration objektumot a megadott index gyűjteményébe.
public:
void Insert(int index, System::CodeDom::CodeAttributeDeclaration ^ value);
public void Insert(int index, System.CodeDom.CodeAttributeDeclaration value);
member this.Insert : int * System.CodeDom.CodeAttributeDeclaration -> unit
Public Sub Insert (index As Integer, value As CodeAttributeDeclaration)
Paraméterek
- index
- Int32
A nulla alapú index, ahová a megadott objektumot be kell szúrni.
- value
- CodeAttributeDeclaration
A CodeAttributeDeclaration beszúrni kívánt objektum.
Példák
Az alábbi példa bemutatja, hogyan adhat hozzá objektumot Insert a CodeAttributeDeclaration metódussal a CodeAttributeDeclarationCollection.
// Inserts a CodeAttributeDeclaration at index 0 of the collection.
collection.Insert( 0, new CodeAttributeDeclaration("DescriptionAttribute", new CodeAttributeArgument(new CodePrimitiveExpression("Test Description"))) );
' Inserts a CodeAttributeDeclaration at index 0 of the collection.
collection.Insert(0, New CodeAttributeDeclaration("DescriptionAttribute", New CodeAttributeArgument(New CodePrimitiveExpression("Test Description"))))