CodeCommentStatementCollection.AddRange Metoda

Definice

Zkopíruje prvky zadaného CodeCommentStatement pole na konec kolekce.

Přetížení

Name Description
AddRange(CodeCommentStatement[])

Zkopíruje prvky zadaného CodeCommentStatement pole na konec kolekce.

AddRange(CodeCommentStatementCollection)

Zkopíruje obsah jiného CodeCommentStatementCollection objektu na konec kolekce.

AddRange(CodeCommentStatement[])

Zdroj:
CodeCommentStatementCollection.cs
Zdroj:
CodeCommentStatementCollection.cs
Zdroj:
CodeCommentStatementCollection.cs
Zdroj:
CodeCommentStatementCollection.cs
Zdroj:
CodeCommentStatementCollection.cs
Zdroj:
CodeCommentStatementCollection.cs
Zdroj:
CodeCommentStatementCollection.cs

Zkopíruje prvky zadaného CodeCommentStatement pole na konec kolekce.

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())

Parametry

value
CodeCommentStatement[]

Pole typu CodeCommentStatement obsahující objekty, které chcete přidat do kolekce.

Výjimky

value je null.

Příklady

Následující příklad ukazuje, jak použít AddRange(CodeCommentStatement[]) přetížení metody přidat členy CodeCommentStatement pole do 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)

Viz také

Platí pro

AddRange(CodeCommentStatementCollection)

Zdroj:
CodeCommentStatementCollection.cs
Zdroj:
CodeCommentStatementCollection.cs
Zdroj:
CodeCommentStatementCollection.cs
Zdroj:
CodeCommentStatementCollection.cs
Zdroj:
CodeCommentStatementCollection.cs
Zdroj:
CodeCommentStatementCollection.cs
Zdroj:
CodeCommentStatementCollection.cs

Zkopíruje obsah jiného CodeCommentStatementCollection objektu na konec kolekce.

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)

Parametry

value
CodeCommentStatementCollection

A CodeCommentStatementCollection obsahující objekty, které chcete přidat do kolekce.

Výjimky

value je null.

Příklady

Následující příklad ukazuje, jak použít AddRange(CodeCommentStatementCollection) přetížení metody přidat členy jednoho CodeCommentStatementCollection do druhého.

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

Viz také

Platí pro