CodeCommentStatementCollection.Add(CodeCommentStatement) Metódus

Definíció

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

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éterek

value
CodeCommentStatement

A CodeCommentStatement 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 CodeCommentStatement egy CodeCommentStatementCollection példányhoz.

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

A következőre érvényes:

Lásd még