CodeCommentStatementCollection.AddRange Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Kopierar elementen i den angivna CodeCommentStatement matrisen till slutet av samlingen.
Överlagringar
| Name | Description |
|---|---|
| AddRange(CodeCommentStatement[]) |
Kopierar elementen i den angivna CodeCommentStatement matrisen till slutet av samlingen. |
| AddRange(CodeCommentStatementCollection) |
Kopierar innehållet i ett annat CodeCommentStatementCollection objekt till slutet av samlingen. |
AddRange(CodeCommentStatement[])
Kopierar elementen i den angivna CodeCommentStatement matrisen till slutet av samlingen.
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())
Parametrar
- value
- CodeCommentStatement[]
En matris av typen CodeCommentStatement som innehåller de objekt som ska läggas till i samlingen.
Undantag
value är null.
Exempel
I följande exempel visas hur du använder AddRange(CodeCommentStatement[]) metodens överlagring för att lägga till medlemmar i en CodeCommentStatement matris i 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)
Se även
Gäller för
AddRange(CodeCommentStatementCollection)
Kopierar innehållet i ett annat CodeCommentStatementCollection objekt till slutet av samlingen.
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)
Parametrar
En CodeCommentStatementCollection som innehåller de objekt som ska läggas till i samlingen.
Undantag
value är null.
Exempel
I följande exempel visas hur du använder metodöverlagringen AddRange(CodeCommentStatementCollection) för att lägga till medlemmar i en CodeCommentStatementCollection annan.
// 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)