CodeCatchClauseCollection.AddRange Yöntem

Tanım

Belirtilen CodeCatchClause dizinin öğelerini koleksiyonun sonuna kopyalar.

Aşırı Yüklemeler

Name Description
AddRange(CodeCatchClause[])

Belirtilen CodeCatchClause dizinin öğelerini koleksiyonun sonuna kopyalar.

AddRange(CodeCatchClauseCollection)

Başka bir CodeCatchClauseCollection nesnenin içeriğini koleksiyonun sonuna kopyalar.

AddRange(CodeCatchClause[])

Kaynak:
CodeCatchClauseCollection.cs
Kaynak:
CodeCatchClauseCollection.cs
Kaynak:
CodeCatchClauseCollection.cs
Kaynak:
CodeCatchClauseCollection.cs
Kaynak:
CodeCatchClauseCollection.cs
Kaynak:
CodeCatchClauseCollection.cs
Kaynak:
CodeCatchClauseCollection.cs

Belirtilen CodeCatchClause dizinin öğelerini koleksiyonun sonuna kopyalar.

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

Parametreler

value
CodeCatchClause[]

Koleksiyona eklenecek nesneleri içeren tür CodeCatchClause dizisi.

Özel durumlar

value, null'e eşittir.

Örnekler

Aşağıdaki örnek, bir nesne AddRange(CodeCatchClause[])dizisinin CodeCatchClause üyelerini öğesine eklemek için yöntem aşırı yüklemesinin CodeCatchClauseCollection nasıl kullanılacağını gösterir.

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

Ayrıca bkz.

Şunlara uygulanır

AddRange(CodeCatchClauseCollection)

Kaynak:
CodeCatchClauseCollection.cs
Kaynak:
CodeCatchClauseCollection.cs
Kaynak:
CodeCatchClauseCollection.cs
Kaynak:
CodeCatchClauseCollection.cs
Kaynak:
CodeCatchClauseCollection.cs
Kaynak:
CodeCatchClauseCollection.cs
Kaynak:
CodeCatchClauseCollection.cs

Başka bir CodeCatchClauseCollection nesnenin içeriğini koleksiyonun sonuna kopyalar.

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)

Parametreler

value
CodeCatchClauseCollection

CodeCatchClauseCollection Koleksiyona eklenecek nesneleri içeren bir.

Özel durumlar

value, null'e eşittir.

Örnekler

Aşağıdaki örnekte, bir nesnenin AddRange(CodeCatchClauseCollection) üyelerini başka bir CodeCatchClauseCollection nesneye eklemek için yöntem aşırı yüklemesinin nasıl kullanılacağı gösterilmektedir 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)

Ayrıca bkz.

Şunlara uygulanır