CodeAttributeArgumentCollection.Add(CodeAttributeArgument) Metódus

Definíció

Hozzáadja a megadott CodeAttributeArgument objektumot a gyűjteményhez.

public:
 int Add(System::CodeDom::CodeAttributeArgument ^ value);
public int Add(System.CodeDom.CodeAttributeArgument value);
member this.Add : System.CodeDom.CodeAttributeArgument -> int
Public Function Add (value As CodeAttributeArgument) As Integer

Paraméterek

value
CodeAttributeArgument

A CodeAttributeArgument hozzáadni kívánt objektum.

Válaszok

Az az index, amelyre az új elemet beszúrták.

Példák

Az alábbi példa bemutatja, hogyan adhat hozzá objektumot CodeAttributeArgument egy CodeAttributeArgumentCollection példányhoz.

// Adds a CodeAttributeArgument to the collection.
collection.Add( new CodeAttributeArgument("Test Boolean Argument", new CodePrimitiveExpression(true)) );
' Adds a CodeAttributeArgument to the collection.
collection.Add(New CodeAttributeArgument("Test Boolean Argument", New CodePrimitiveExpression(True)))

A következőre érvényes:

Lásd még