CodeCatchClauseCollection.AddRange Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Copia gli elementi della matrice di CodeCatchClause specificata alla fine dell'insieme.
Overload
| Nome | Descrizione |
|---|---|
| AddRange(CodeCatchClause[]) |
Copia gli elementi della matrice di CodeCatchClause specificata alla fine dell'insieme. |
| AddRange(CodeCatchClauseCollection) |
Copia il contenuto di un altro CodeCatchClauseCollection oggetto alla fine dell'insieme. |
AddRange(CodeCatchClause[])
Copia gli elementi della matrice di CodeCatchClause specificata alla fine dell'insieme.
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())
Parametri
- value
- CodeCatchClause[]
Matrice di tipo CodeCatchClause che contiene gli oggetti da aggiungere all'insieme.
Eccezioni
value è null.
Esempio
Nell'esempio seguente viene illustrato come utilizzare l'overload del AddRange(CodeCatchClause[]) metodo per aggiungere i membri di una matrice di CodeCatchClause oggetti all'oggetto 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)
Vedi anche
Si applica a
AddRange(CodeCatchClauseCollection)
Copia il contenuto di un altro CodeCatchClauseCollection oggetto alla fine dell'insieme.
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)
Parametri
Oggetto CodeCatchClauseCollection contenente gli oggetti da aggiungere all'insieme.
Eccezioni
value è null.
Esempio
Nell'esempio seguente viene illustrato come utilizzare l'overload del AddRange(CodeCatchClauseCollection) metodo per aggiungere i membri di un CodeCatchClauseCollection oggetto a un altro 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)