CodeCatchClauseCollection.AddRange Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Copie les éléments du tableau spécifié CodeCatchClause à la fin de la collection.
Surcharges
| Nom | Description |
|---|---|
| AddRange(CodeCatchClause[]) |
Copie les éléments du tableau spécifié CodeCatchClause à la fin de la collection. |
| AddRange(CodeCatchClauseCollection) |
Copie le contenu d’un autre CodeCatchClauseCollection objet à la fin de la collection. |
AddRange(CodeCatchClause[])
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
Copie les éléments du tableau spécifié CodeCatchClause à la fin de la collection.
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())
Paramètres
- value
- CodeCatchClause[]
Tableau de type CodeCatchClause qui contient les objets à ajouter à la collection.
Exceptions
value a la valeur null.
Exemples
L’exemple suivant montre comment utiliser la AddRange(CodeCatchClause[]) surcharge de méthode pour ajouter les membres d’un tableau d’objets CodeCatchClause à l’objet 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)
Voir aussi
S’applique à
AddRange(CodeCatchClauseCollection)
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
- Source:
- CodeCatchClauseCollection.cs
Copie le contenu d’un autre CodeCatchClauseCollection objet à la fin de la collection.
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)
Paramètres
Qui CodeCatchClauseCollection contient les objets à ajouter à la collection.
Exceptions
value a la valeur null.
Exemples
L’exemple suivant montre comment utiliser la AddRange(CodeCatchClauseCollection) surcharge de méthode pour ajouter les membres d’un objet à un CodeCatchClauseCollection autre 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)