CodeAttributeArgumentCollection.Add(CodeAttributeArgument) Méthode

Définition

Ajoute l’objet spécifié CodeAttributeArgument à 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 auquel le nouvel élément a été inséré.

Exemples

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

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