CodeCatchClauseCollection.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 CodeCatchClause para o final da coleção.
Sobrecargas
| Name | Description |
|---|---|
| AddRange(CodeCatchClause[]) |
Copia os elementos do array especificado CodeCatchClause para o final da coleção. |
| AddRange(CodeCatchClauseCollection) |
Copia o conteúdo de outro CodeCatchClauseCollection objeto para o final da coleção. |
AddRange(CodeCatchClause[])
Copia os elementos do array especificado CodeCatchClause para o final da coleção.
public:
void AddRange(cli::array <System::CodeDom::CodeCatchClause ^> ^ value);
public void AddRange(System.CodeDom.CodeCatchClause[] value);
member this.AddRange : System.CodeDom.CodeCatchClause[] -> unit
Public Sub AddRange (value As CodeCatchClause())
Parâmetros
- value
- CodeCatchClause[]
Um array de tipos CodeCatchClause que contém os objetos a adicionar à coleção.
Exceções
value é null.
Exemplos
O exemplo seguinte demonstra como usar a AddRange(CodeCatchClause[]) sobrecarga de métodos para adicionar os membros de um array de CodeCatchClause objetos ao CodeCatchClauseCollection.
// Adds an array of CodeCatchClause objects to the collection.
CodeCatchClause[] clauses = { new CodeCatchClause(), new CodeCatchClause() };
collection.AddRange( clauses );
// Adds a collection of CodeCatchClause objects to the collection.
CodeCatchClauseCollection clausesCollection = new CodeCatchClauseCollection();
clausesCollection.Add( new CodeCatchClause("e", new CodeTypeReference(typeof(System.ArgumentOutOfRangeException))) );
clausesCollection.Add( new CodeCatchClause("e") );
collection.AddRange( clausesCollection );
' Adds an array of CodeCatchClause objects to the collection.
Dim clauses As CodeCatchClause() = {New CodeCatchClause(), New CodeCatchClause()}
collection.AddRange(clauses)
' Adds a collection of CodeCatchClause objects to the collection.
Dim clausesCollection As New CodeCatchClauseCollection()
clausesCollection.Add(New CodeCatchClause("e", New CodeTypeReference(GetType(System.ArgumentOutOfRangeException))))
clausesCollection.Add(New CodeCatchClause("e"))
collection.AddRange(clausesCollection)
Ver também
Aplica-se a
AddRange(CodeCatchClauseCollection)
Copia o conteúdo de outro CodeCatchClauseCollection objeto para o final da coleção.
public:
void AddRange(System::CodeDom::CodeCatchClauseCollection ^ value);
public void AddRange(System.CodeDom.CodeCatchClauseCollection value);
member this.AddRange : System.CodeDom.CodeCatchClauseCollection -> unit
Public Sub AddRange (value As CodeCatchClauseCollection)
Parâmetros
A CodeCatchClauseCollection que contém os objetos a adicionar à coleção.
Exceções
value é null.
Exemplos
O exemplo seguinte demonstra como usar o AddRange(CodeCatchClauseCollection) método sobrecarga para adicionar os membros de um CodeCatchClauseCollection objeto a outro CodeCatchClauseCollection.
// Adds an array of CodeCatchClause objects to the collection.
CodeCatchClause[] clauses = { new CodeCatchClause(), new CodeCatchClause() };
collection.AddRange( clauses );
// Adds a collection of CodeCatchClause objects to the collection.
CodeCatchClauseCollection clausesCollection = new CodeCatchClauseCollection();
clausesCollection.Add( new CodeCatchClause("e", new CodeTypeReference(typeof(System.ArgumentOutOfRangeException))) );
clausesCollection.Add( new CodeCatchClause("e") );
collection.AddRange( clausesCollection );
' Adds an array of CodeCatchClause objects to the collection.
Dim clauses As CodeCatchClause() = {New CodeCatchClause(), New CodeCatchClause()}
collection.AddRange(clauses)
' Adds a collection of CodeCatchClause objects to the collection.
Dim clausesCollection As New CodeCatchClauseCollection()
clausesCollection.Add(New CodeCatchClause("e", New CodeTypeReference(GetType(System.ArgumentOutOfRangeException))))
clausesCollection.Add(New CodeCatchClause("e"))
collection.AddRange(clausesCollection)