CodeCommentStatementCollection.AddRange Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Copia os elementos do array especificado CodeCommentStatement para o final da coleção.
Sobrecargas
| Name | Description |
|---|---|
| AddRange(CodeCommentStatement[]) |
Copia os elementos do array especificado CodeCommentStatement para o final da coleção. |
| AddRange(CodeCommentStatementCollection) |
Copia o conteúdo de outro CodeCommentStatementCollection objeto para o final da coleção. |
AddRange(CodeCommentStatement[])
Copia os elementos do array especificado CodeCommentStatement para o final da coleção.
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[]
Um array de tipos CodeCommentStatement que contém os objetos a adicionar à coleção.
Exceções
value é null.
Exemplos
O exemplo seguinte demonstra como usar a AddRange(CodeCommentStatement[]) sobrecarga de métodos para adicionar os membros de um CodeCommentStatement array ao 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)
Ver também
Aplica-se a
AddRange(CodeCommentStatementCollection)
Copia o conteúdo de outro CodeCommentStatementCollection objeto para o final da coleção.
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
A CodeCommentStatementCollection que contém os objetos a adicionar à coleção.
Exceções
value é null.
Exemplos
O exemplo seguinte demonstra como usar a AddRange(CodeCommentStatementCollection) sobrecarga de métodos para adicionar os membros de um CodeCommentStatementCollection ao outro.
// 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)