CodeAttributeArgumentCollection.Add(CodeAttributeArgument) Methode

Definitie

Hiermee voegt u het opgegeven CodeAttributeArgument object toe aan de verzameling.

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

Parameters

value
CodeAttributeArgument

Het CodeAttributeArgument object dat moet worden toegevoegd.

Retouren

De index waarop het nieuwe element is ingevoegd.

Voorbeelden

In het volgende voorbeeld ziet u hoe u een CodeAttributeArgument object toevoegt aan een CodeAttributeArgumentCollection exemplaar.

// 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)))

Van toepassing op

Zie ook