CodeCommentStatementCollection.AddRange Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Copia los elementos de la matriz especificada CodeCommentStatement al final de la colección.
Sobrecargas
| Nombre | Description |
|---|---|
| AddRange(CodeCommentStatement[]) |
Copia los elementos de la matriz especificada CodeCommentStatement al final de la colección. |
| AddRange(CodeCommentStatementCollection) |
Copia el contenido de otro CodeCommentStatementCollection objeto al final de la colección. |
AddRange(CodeCommentStatement[])
Copia los elementos de la matriz especificada CodeCommentStatement al final de la colección.
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())
Parámetros
- value
- CodeCommentStatement[]
Matriz de tipo CodeCommentStatement que contiene los objetos que se van a agregar a la colección.
Excepciones
value es null.
Ejemplos
En el ejemplo siguiente se muestra cómo usar la sobrecarga del AddRange(CodeCommentStatement[]) método para agregar los miembros de una CodeCommentStatement matriz 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)
Consulte también
Se aplica a
AddRange(CodeCommentStatementCollection)
Copia el contenido de otro CodeCommentStatementCollection objeto al final de la colección.
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)
Parámetros
que CodeCommentStatementCollection contiene los objetos que se van a agregar a la colección.
Excepciones
value es null.
Ejemplos
En el ejemplo siguiente se muestra cómo usar la sobrecarga del AddRange(CodeCommentStatementCollection) método para agregar los miembros de uno CodeCommentStatementCollection a otro.
// 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)