Share via


CodeCommentStatementCollection.Add(CodeCommentStatement) Méthode

Définition

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

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

Paramètres

value
CodeCommentStatement

Objet CodeCommentStatement à ajouter.

Retours

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

Exemples

L’exemple suivant montre comment ajouter un CodeCommentStatement objet à un CodeCommentStatementCollection instance.

// Adds a CodeCommentStatement to the collection.
collection->Add( gcnew CodeCommentStatement( "Test comment" ) );
// Adds a CodeCommentStatement to the collection.
collection.Add( new CodeCommentStatement("Test comment") );
' Adds a CodeCommentStatement to the collection.
collection.Add(New CodeCommentStatement("Test comment"))

S’applique à

Voir aussi