CodeCommentStatementCollection.AddRange Metódus

Definíció

Másolja a megadott CodeCommentStatement tömb elemeit a gyűjtemény végére.

Túlterhelések

Name Description
AddRange(CodeCommentStatement[])

Másolja a megadott CodeCommentStatement tömb elemeit a gyűjtemény végére.

AddRange(CodeCommentStatementCollection)

Másolja egy másik CodeCommentStatementCollection objektum tartalmát a gyűjtemény végére.

AddRange(CodeCommentStatement[])

Forrás:
CodeCommentStatementCollection.cs
Forrás:
CodeCommentStatementCollection.cs
Forrás:
CodeCommentStatementCollection.cs
Forrás:
CodeCommentStatementCollection.cs
Forrás:
CodeCommentStatementCollection.cs
Forrás:
CodeCommentStatementCollection.cs
Forrás:
CodeCommentStatementCollection.cs

Másolja a megadott CodeCommentStatement tömb elemeit a gyűjtemény végére.

public:
 void AddRange(cli::array <System::CodeDom::CodeCommentStatement ^> ^ value);
public void AddRange(System.CodeDom.CodeCommentStatement[] value);
member this.AddRange : System.CodeDom.CodeCommentStatement[] -> unit
Public Sub AddRange (value As CodeCommentStatement())

Paraméterek

value
CodeCommentStatement[]

Olyan típusú CodeCommentStatement tömb, amely tartalmazza a gyűjteményhez hozzáadni kívánt objektumokat.

Kivételek

value az null.

Példák

Az alábbi példa bemutatja, hogyan használható a AddRange(CodeCommentStatement[]) metódus túlterhelése a tömb tagjainak CodeCommentStatement hozzáadására a CodeCommentStatementCollection.

// Adds an array of CodeCommentStatement objects to the collection.
CodeCommentStatement[] comments = { new CodeCommentStatement("Test comment"), new CodeCommentStatement("Another test comment") };
collection.AddRange( comments );

// Adds a collection of CodeCommentStatement objects to the collection.
CodeCommentStatementCollection commentsCollection = new CodeCommentStatementCollection();
commentsCollection.Add( new CodeCommentStatement("Test comment") );
commentsCollection.Add( new CodeCommentStatement("Another test comment") );
collection.AddRange( commentsCollection );
' Adds an array of CodeCommentStatement objects to the collection.
Dim comments As CodeCommentStatement() = {New CodeCommentStatement("Test comment"), New CodeCommentStatement("Another test comment")}
collection.AddRange(comments)

' Adds a collection of CodeCommentStatement objects to the 
' collection.
Dim commentsCollection As New CodeCommentStatementCollection()
commentsCollection.Add(New CodeCommentStatement("Test comment"))
commentsCollection.Add(New CodeCommentStatement("Another test comment"))
collection.AddRange(commentsCollection)

Lásd még

A következőre érvényes:

AddRange(CodeCommentStatementCollection)

Forrás:
CodeCommentStatementCollection.cs
Forrás:
CodeCommentStatementCollection.cs
Forrás:
CodeCommentStatementCollection.cs
Forrás:
CodeCommentStatementCollection.cs
Forrás:
CodeCommentStatementCollection.cs
Forrás:
CodeCommentStatementCollection.cs
Forrás:
CodeCommentStatementCollection.cs

Másolja egy másik CodeCommentStatementCollection objektum tartalmát a gyűjtemény végére.

public:
 void AddRange(System::CodeDom::CodeCommentStatementCollection ^ value);
public void AddRange(System.CodeDom.CodeCommentStatementCollection value);
member this.AddRange : System.CodeDom.CodeCommentStatementCollection -> unit
Public Sub AddRange (value As CodeCommentStatementCollection)

Paraméterek

value
CodeCommentStatementCollection

A CodeCommentStatementCollection gyűjteményhez hozzáadni kívánt objektumokat tartalmazó objektum.

Kivételek

value az null.

Példák

Az alábbi példa bemutatja, hogyan használható a AddRange(CodeCommentStatementCollection) metódus túlterhelése az egyik CodeCommentStatementCollection tag egy másikhoz való hozzáadásához.

// Adds an array of CodeCommentStatement objects to the collection.
CodeCommentStatement[] comments = { new CodeCommentStatement("Test comment"), new CodeCommentStatement("Another test comment") };
collection.AddRange( comments );

// Adds a collection of CodeCommentStatement objects to the collection.
CodeCommentStatementCollection commentsCollection = new CodeCommentStatementCollection();
commentsCollection.Add( new CodeCommentStatement("Test comment") );
commentsCollection.Add( new CodeCommentStatement("Another test comment") );
collection.AddRange( commentsCollection );
' Adds an array of CodeCommentStatement objects to the collection.
Dim comments As CodeCommentStatement() = {New CodeCommentStatement("Test comment"), New CodeCommentStatement("Another test comment")}
collection.AddRange(comments)

' Adds a collection of CodeCommentStatement objects to the 
' collection.
Dim commentsCollection As New CodeCommentStatementCollection()
commentsCollection.Add(New CodeCommentStatement("Test comment"))
commentsCollection.Add(New CodeCommentStatement("Another test comment"))
collection.AddRange(commentsCollection)

Lásd még

A következőre érvényes: