Aracılığıyla paylaş


CodeCatchClauseCollection.AddRange Yöntem

Tanım

Belirtilen CodeCatchClause dizinin öğelerini koleksiyonun sonuna kopyalar.

Aşırı Yüklemeler

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

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 değeridir.

Örnekler

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

// Adds an array of CodeCatchClause objects to the collection.
array<CodeCatchClause^>^clauses = {gcnew CodeCatchClause,gcnew CodeCatchClause};
collection->AddRange( clauses );

// Adds a collection of CodeCatchClause objects to the collection.
CodeCatchClauseCollection^ clausesCollection = gcnew CodeCatchClauseCollection;
clausesCollection->Add( gcnew CodeCatchClause( "e",gcnew CodeTypeReference( System::ArgumentOutOfRangeException::typeid ) ) );
clausesCollection->Add( gcnew CodeCatchClause( "e" ) );
collection->AddRange( clausesCollection );
// 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

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 değeridir.

Örnekler

Aşağıdaki örnekte, bir nesnenin AddRange(CodeCatchClauseCollection) üyelerini başka bir CodeCatchClauseCollection nesnesine 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.
array<CodeCatchClause^>^clauses = {gcnew CodeCatchClause,gcnew CodeCatchClause};
collection->AddRange( clauses );

// Adds a collection of CodeCatchClause objects to the collection.
CodeCatchClauseCollection^ clausesCollection = gcnew CodeCatchClauseCollection;
clausesCollection->Add( gcnew CodeCatchClause( "e",gcnew CodeTypeReference( System::ArgumentOutOfRangeException::typeid ) ) );
clausesCollection->Add( gcnew CodeCatchClause( "e" ) );
collection->AddRange( clausesCollection );
// 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