CodeCommentStatementCollection.AddRange Methode

Definition

Kopiert die Elemente des angegebenen CodeCommentStatement Arrays an das Ende der Auflistung.

Überlädt

Name Beschreibung
AddRange(CodeCommentStatement[])

Kopiert die Elemente des angegebenen CodeCommentStatement Arrays an das Ende der Auflistung.

AddRange(CodeCommentStatementCollection)

Kopiert den Inhalt eines anderen CodeCommentStatementCollection Objekts an das Ende der Auflistung.

AddRange(CodeCommentStatement[])

Kopiert die Elemente des angegebenen CodeCommentStatement Arrays an das Ende der Auflistung.

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

Parameter

value
CodeCommentStatement[]

Ein Array vom Typ CodeCommentStatement , das die Objekte enthält, die der Auflistung hinzugefügt werden sollen.

Ausnahmen

value ist null.

Beispiele

Im folgenden Beispiel wird veranschaulicht, wie die AddRange(CodeCommentStatement[]) Methodenüberladung verwendet wird, um die Member eines Arrays zum Hinzufügen der Elemente eines CodeCommentStatement Arrays zu verwenden 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)

Weitere Informationen

Gilt für:

AddRange(CodeCommentStatementCollection)

Kopiert den Inhalt eines anderen CodeCommentStatementCollection Objekts an das Ende der Auflistung.

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)

Parameter

value
CodeCommentStatementCollection

Ein CodeCommentStatementCollection Objekt, das die Objekte enthält, die der Auflistung hinzugefügt werden sollen.

Ausnahmen

value ist null.

Beispiele

Im folgenden Beispiel wird veranschaulicht, wie Die AddRange(CodeCommentStatementCollection) Methodenüberladung verwendet wird, um die Member eines CodeCommentStatementCollection anderen hinzuzufügen.

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

Weitere Informationen

Gilt für: