CodeCatchClauseCollection.AddRange メソッド

定義

指定した CodeCatchClause 配列の要素をコレクションの末尾にコピーします。

オーバーロード

名前 説明
AddRange(CodeCatchClause[])

指定した CodeCatchClause 配列の要素をコレクションの末尾にコピーします。

AddRange(CodeCatchClauseCollection)

別の CodeCatchClauseCollection オブジェクトの内容をコレクションの末尾にコピーします。

AddRange(CodeCatchClause[])

ソース:
CodeCatchClauseCollection.cs
ソース:
CodeCatchClauseCollection.cs
ソース:
CodeCatchClauseCollection.cs
ソース:
CodeCatchClauseCollection.cs
ソース:
CodeCatchClauseCollection.cs
ソース:
CodeCatchClauseCollection.cs
ソース:
CodeCatchClauseCollection.cs

指定した CodeCatchClause 配列の要素をコレクションの末尾にコピーします。

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

パラメーター

value
CodeCatchClause[]

コレクションに追加するオブジェクトを含む CodeCatchClause 型の配列。

例外

valuenullです。

次の例では、 AddRange(CodeCatchClause[]) メソッドオーバーロードを使用して、 CodeCatchClause オブジェクトの配列のメンバーを 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)

こちらもご覧ください

適用対象

AddRange(CodeCatchClauseCollection)

ソース:
CodeCatchClauseCollection.cs
ソース:
CodeCatchClauseCollection.cs
ソース:
CodeCatchClauseCollection.cs
ソース:
CodeCatchClauseCollection.cs
ソース:
CodeCatchClauseCollection.cs
ソース:
CodeCatchClauseCollection.cs
ソース:
CodeCatchClauseCollection.cs

別の CodeCatchClauseCollection オブジェクトの内容をコレクションの末尾にコピーします。

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)

パラメーター

value
CodeCatchClauseCollection

コレクションに追加するオブジェクトを含む CodeCatchClauseCollection

例外

valuenullです。

次の例では、 AddRange(CodeCatchClauseCollection) メソッドオーバーロードを使用して、1 つの CodeCatchClauseCollection オブジェクトのメンバーを別の 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)

こちらもご覧ください

適用対象