CodeCatchClauseCollection.AddRange Metódus

Definíció

Másolja a megadott CodeCatchClause tömb elemeit a gyűjtemény végére.

Túlterhelések

Name Description
AddRange(CodeCatchClause[])

Másolja a megadott CodeCatchClause tömb elemeit a gyűjtemény végére.

AddRange(CodeCatchClauseCollection)

Másolja egy másik CodeCatchClauseCollection objektum tartalmát a gyűjtemény végére.

AddRange(CodeCatchClause[])

Forrás:
CodeCatchClauseCollection.cs
Forrás:
CodeCatchClauseCollection.cs
Forrás:
CodeCatchClauseCollection.cs
Forrás:
CodeCatchClauseCollection.cs
Forrás:
CodeCatchClauseCollection.cs
Forrás:
CodeCatchClauseCollection.cs
Forrás:
CodeCatchClauseCollection.cs

Másolja a megadott CodeCatchClause tömb elemeit a gyűjtemény végére.

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éterek

value
CodeCatchClause[]

Olyan típusú CodeCatchClause tömb, amely tartalmazza a gyűjteményhez hozzáadni kívánt objektumokat.

Kivételek

value az null.

Példák

Az alábbi példa bemutatja, hogyan lehet a AddRange(CodeCatchClause[]) metódust túlterheléssel hozzáadni egy objektumtömb CodeCatchClause tagjaihoz a 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)

Lásd még

A következőre érvényes:

AddRange(CodeCatchClauseCollection)

Forrás:
CodeCatchClauseCollection.cs
Forrás:
CodeCatchClauseCollection.cs
Forrás:
CodeCatchClauseCollection.cs
Forrás:
CodeCatchClauseCollection.cs
Forrás:
CodeCatchClauseCollection.cs
Forrás:
CodeCatchClauseCollection.cs
Forrás:
CodeCatchClauseCollection.cs

Másolja egy másik CodeCatchClauseCollection objektum tartalmát a gyűjtemény végére.

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éterek

value
CodeCatchClauseCollection

A CodeCatchClauseCollection gyűjteményhez hozzáadni kívánt objektumokat tartalmazó objektum.

Kivételek

value az null.

Példák

Az alábbi példa bemutatja, hogyan használható a AddRange(CodeCatchClauseCollection) metódus túlterhelése az egyik CodeCatchClauseCollection objektum tagjainak a másikhoz CodeCatchClauseCollectionvaló hozzáadásához.

// 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)

Lásd még

A következőre érvényes: