Share via


CodeAttributeArgumentCollection.Add(CodeAttributeArgument) Méthode

Définition

Ajoute l'objet CodeAttributeArgument spécifié à la collection.

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ètres

Retours

Index au niveau duquel le nouvel élément a été inséré.

Exemples

L’exemple suivant montre comment ajouter un CodeAttributeArgument objet à un CodeAttributeArgumentCollection instance.

// Adds a CodeAttributeArgument to the collection.
collection->Add( gcnew CodeAttributeArgument( "Test Boolean Argument",gcnew CodePrimitiveExpression( true ) ) );
// 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)))

S’applique à

Voir aussi