CodeCatchClauseCollection.AddRange メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定した CodeCatchClause 配列の要素をコレクションの末尾にコピーします。
オーバーロード
| 名前 | 説明 |
|---|---|
| AddRange(CodeCatchClause[]) |
指定した CodeCatchClause 配列の要素をコレクションの末尾にコピーします。 |
| AddRange(CodeCatchClauseCollection) |
別の CodeCatchClauseCollection オブジェクトの内容をコレクションの末尾にコピーします。 |
AddRange(CodeCatchClause[])
指定した 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 型の配列。
例外
value は nullです。
例
次の例では、 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 オブジェクトの内容をコレクションの末尾にコピーします。
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)
パラメーター
コレクションに追加するオブジェクトを含む CodeCatchClauseCollection 。
例外
value は nullです。
例
次の例では、 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)