CodeCatchClauseCollection.AddRange Metoda

Definice

Zkopíruje prvky zadaného CodeCatchClause pole na konec kolekce.

Přetížení

Name Description
AddRange(CodeCatchClause[])

Zkopíruje prvky zadaného CodeCatchClause pole na konec kolekce.

AddRange(CodeCatchClauseCollection)

Zkopíruje obsah jiného CodeCatchClauseCollection objektu na konec kolekce.

AddRange(CodeCatchClause[])

Zdroj:
CodeCatchClauseCollection.cs
Zdroj:
CodeCatchClauseCollection.cs
Zdroj:
CodeCatchClauseCollection.cs
Zdroj:
CodeCatchClauseCollection.cs
Zdroj:
CodeCatchClauseCollection.cs
Zdroj:
CodeCatchClauseCollection.cs
Zdroj:
CodeCatchClauseCollection.cs

Zkopíruje prvky zadaného CodeCatchClause pole na konec kolekce.

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

Parametry

value
CodeCatchClause[]

Pole typu CodeCatchClause obsahující objekty, které chcete přidat do kolekce.

Výjimky

value je null.

Příklady

Následující příklad ukazuje, jak použít AddRange(CodeCatchClause[]) přetížení metody přidat členy pole CodeCatchClause objektů do objektu 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)

Viz také

Platí pro

AddRange(CodeCatchClauseCollection)

Zdroj:
CodeCatchClauseCollection.cs
Zdroj:
CodeCatchClauseCollection.cs
Zdroj:
CodeCatchClauseCollection.cs
Zdroj:
CodeCatchClauseCollection.cs
Zdroj:
CodeCatchClauseCollection.cs
Zdroj:
CodeCatchClauseCollection.cs
Zdroj:
CodeCatchClauseCollection.cs

Zkopíruje obsah jiného CodeCatchClauseCollection objektu na konec kolekce.

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)

Parametry

value
CodeCatchClauseCollection

A CodeCatchClauseCollection obsahující objekty, které chcete přidat do kolekce.

Výjimky

value je null.

Příklady

Následující příklad ukazuje, jak použít AddRange(CodeCatchClauseCollection) přetížení metody přidat členy jednoho CodeCatchClauseCollection objektu do jiného 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)

Viz také

Platí pro