CodeCatchClauseCollectionとは? わかりやすく解説

CodeCatchClauseCollection クラス

CodeCatchClause オブジェクトのコレクションを表します。

名前空間: System.CodeDom
アセンブリ: System (system.dll 内)
構文構文

<SerializableAttribute> _
<ComVisibleAttribute(True)> _
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
Public Class CodeCatchClauseCollection
    Inherits CollectionBase
Dim instance As CodeCatchClauseCollection
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)] 
public class CodeCatchClauseCollection : CollectionBase
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)] 
public ref class CodeCatchClauseCollection
 : public CollectionBase
/** @attribute SerializableAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
/** @attribute ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) */ 
public class CodeCatchClauseCollection extends
 CollectionBase
SerializableAttribute 
ComVisibleAttribute(true) 
ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) 
public class CodeCatchClauseCollection extends
 CollectionBase
解説解説
使用例使用例
' Creates an empty CodeCatchClauseCollection.
Dim collection As New CodeCatchClauseCollection()

' Adds a CodeCatchClause to the collection.
collection.Add(New CodeCatchClause("e"))

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

' Tests for the presence of a CodeCatchClause in the 
' collection, and retrieves its index if it is found.
Dim testClause As New CodeCatchClause("e")
Dim itemIndex As Integer
 = -1
If collection.Contains(testClause) Then
    itemIndex = collection.IndexOf(testClause)
End If

' Copies the contents of the collection beginning at index 0 to the
 specified CodeCatchClause array.
' 'clauses' is a CodeCatchClause array.
collection.CopyTo(clauses, 0)

' Retrieves the count of the items in the collection.
Dim collectionCount As Integer
 = collection.Count

' Inserts a CodeCatchClause at index 0 of the collection.
collection.Insert(0, New CodeCatchClause("e"))

' Removes the specified CodeCatchClause from the collection.
Dim clause As New CodeCatchClause("e")
collection.Remove(clause)

' Removes the CodeCatchClause at index 0.
collection.RemoveAt(0)
// Creates an empty CodeCatchClauseCollection.
CodeCatchClauseCollection collection = new CodeCatchClauseCollection();

// Adds a CodeCatchClause to the collection.
collection.Add( new CodeCatchClause("e") );

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

// Tests for the presence of a CodeCatchClause in the 
// collection, and retrieves its index if it is found.
CodeCatchClause testClause = new CodeCatchClause("e");
int itemIndex = -1;
if( collection.Contains( testClause ) )
    itemIndex = collection.IndexOf( testClause );

// Copies the contents of the collection beginning at index 0 to the
 specified CodeCatchClause array.
// 'clauses' is a CodeCatchClause array.
collection.CopyTo( clauses, 0 );

// Retrieves the count of the items in the collection.
int collectionCount = collection.Count;

// Inserts a CodeCatchClause at index 0 of the collection.
collection.Insert( 0, new CodeCatchClause("e") );

// Removes the specified CodeCatchClause from the collection.
CodeCatchClause clause = new CodeCatchClause("e");
collection.Remove( clause );

// Removes the CodeCatchClause at index 0.
collection.RemoveAt(0);
// Creates an empty CodeCatchClauseCollection.
CodeCatchClauseCollection^ collection = gcnew CodeCatchClauseCollection;

// Adds a CodeCatchClause to the collection.
collection->Add( gcnew CodeCatchClause( "e" ) );

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

// Tests for the presence of a CodeCatchClause in the 
// collection, and retrieves its index if it is found.
CodeCatchClause^ testClause = gcnew CodeCatchClause( "e" );
int itemIndex = -1;
if ( collection->Contains( testClause ) )
   itemIndex = collection->IndexOf( testClause );

// Copies the contents of the collection beginning at index 0 to the
 specified CodeCatchClause array.
// 'clauses' is a CodeCatchClause array.
collection->CopyTo( clauses, 0 );

// Retrieves the count of the items in the collection.
int collectionCount = collection->Count;

// Inserts a CodeCatchClause at index 0 of the collection.
collection->Insert( 0, gcnew CodeCatchClause( "e" ) );

// Removes the specified CodeCatchClause from the collection.
CodeCatchClause^ clause = gcnew CodeCatchClause( "e" );
collection->Remove( clause );

// Removes the CodeCatchClause at index 0.
collection->RemoveAt( 0 );
// Creates an empty CodeCatchClauseCollection.
CodeCatchClauseCollection collection = new CodeCatchClauseCollection();

// Adds a CodeCatchClause to the collection.
collection.Add(new CodeCatchClause("e"));

// 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(System.ArgumentOutOfRangeException.
    class.ToType())));
clausesCollection.Add(new CodeCatchClause("e"));
collection.AddRange(clausesCollection);

// Tests for the presence of a CodeCatchClause in the 
// collection, and retrieves its index if it is found.
CodeCatchClause testClause = new CodeCatchClause("e");
int itemIndex = -1;
if (collection.Contains(testClause)) {
    itemIndex = collection.IndexOf(testClause);
}

// Copies the contents of the collection beginning at index 0 to
// the specified CodeCatchClause array.
// 'clauses' is a CodeCatchClause array.
collection.CopyTo(clauses, 0);

// Retrieves the count of the items in the collection.
int collectionCount = collection.get_Count();

// Inserts a CodeCatchClause at index 0 of the collection.
collection.Insert(0, new CodeCatchClause("e"));

// Removes the specified CodeCatchClause from the collection.
CodeCatchClause clause = new CodeCatchClause("e");
collection.Remove(clause);

// Removes the CodeCatchClause at index 0.
collection.RemoveAt(0);
継承階層継承階層
System.Object
   System.Collections.CollectionBase
    System.CodeDom.CodeCatchClauseCollection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CodeCatchClauseCollection メンバ
System.CodeDom 名前空間
CodeCatchClause クラス

CodeCatchClauseCollection コンストラクタ ()

CodeCatchClauseCollection クラスの新しいインスタンスを初期化します。

名前空間: System.CodeDom
アセンブリ: System (system.dll 内)
構文構文

Dim instance As New CodeCatchClauseCollection
public CodeCatchClauseCollection ()
public:
CodeCatchClauseCollection ()
public CodeCatchClauseCollection ()
public function CodeCatchClauseCollection ()
使用例使用例
' Creates an empty CodeCatchClauseCollection.
Dim collection As New CodeCatchClauseCollection()
// Creates an empty CodeCatchClauseCollection.
CodeCatchClauseCollection collection = new CodeCatchClauseCollection();
// Creates an empty CodeCatchClauseCollection.
CodeCatchClauseCollection^ collection = gcnew CodeCatchClauseCollection;
// Creates an empty CodeCatchClauseCollection.
CodeCatchClauseCollection collection = new CodeCatchClauseCollection();
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CodeCatchClauseCollection クラス
CodeCatchClauseCollection メンバ
System.CodeDom 名前空間

CodeCatchClauseCollection コンストラクタ (CodeCatchClauseCollection)

指定したソース コレクションの要素を格納する CodeCatchClauseCollection クラスの新しいインスタンスを初期化します。

名前空間: System.CodeDom
アセンブリ: System (system.dll 内)
構文構文

Public Sub New ( _
    value As CodeCatchClauseCollection _
)
Dim value As CodeCatchClauseCollection

Dim instance As New CodeCatchClauseCollection(value)
public CodeCatchClauseCollection (
    CodeCatchClauseCollection value
)
public:
CodeCatchClauseCollection (
    CodeCatchClauseCollection^ value
)
public CodeCatchClauseCollection (
    CodeCatchClauseCollection value
)
public function CodeCatchClauseCollection (
    value : CodeCatchClauseCollection
)

パラメータ

value

コレクションを初期化するために使用する CodeCatchClauseCollection。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CodeCatchClauseCollection クラス
CodeCatchClauseCollection メンバ
System.CodeDom 名前空間

CodeCatchClauseCollection コンストラクタ (CodeCatchClause[])


CodeCatchClauseCollection コンストラクタ

CodeCatchClauseCollection クラスの新しいインスタンスを初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
CodeCatchClauseCollection () CodeCatchClauseCollection クラスの新しいインスタンスを初期化します。
CodeCatchClauseCollection (CodeCatchClause[]) CodeCatchClause オブジェクトの指定した配列を格納する CodeCatchClauseCollection クラスの新しいインスタンスを初期化します。
CodeCatchClauseCollection (CodeCatchClauseCollection) 指定したソース コレクションの要素を格納する CodeCatchClauseCollection クラスの新しいインスタンスを初期化します。
参照参照

関連項目

CodeCatchClauseCollection クラス
CodeCatchClauseCollection メンバ
System.CodeDom 名前空間

CodeCatchClauseCollection プロパティ


パブリック プロパティパブリック プロパティ

( プロテクト プロパティ も参照)
  名前 説明
パブリック プロパティ Capacity  CollectionBase に格納できる要素の数を取得または設定します。 ( CollectionBase から継承されます。)
パブリック プロパティ Count  CollectionBase インスタンスに格納されている要素の数を取得します。このプロパティはオーバーライドできません。 ( CollectionBase から継承されます。)
パブリック プロパティ Item コレクション内の指定したインデックスでの CodeCatchClause を取得または設定します。
プロテクト プロパティプロテクト プロパティ
  名前 説明
プロテクト プロパティ InnerList  CollectionBase インスタンス内の要素のリストを格納する ArrayList を取得します。 ( CollectionBase から継承されます。)
プロテクト プロパティ List  CollectionBase インスタンス内の要素のリストを格納する IList を取得します。 ( CollectionBase から継承されます。)
参照参照

関連項目

CodeCatchClauseCollection クラス
System.CodeDom 名前空間
CodeCatchClause クラス

CodeCatchClauseCollection メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド も参照)
  名前 説明
パブリック メソッド Add 指定した CodeCatchClause をコレクションに追加します。
パブリック メソッド AddRange オーバーロードされます。 指定した CodeCatchClause 配列の要素をコレクションの末尾にコピーします。
パブリック メソッド Clear  CollectionBase インスタンスからすべてのオブジェクトを削除します。このメソッドはオーバーライドできません。 ( CollectionBase から継承されます。)
パブリック メソッド Contains 指定した CodeCatchClause がコレクションに格納されているかどうかを示す値を取得します。
パブリック メソッド CopyTo 指定したインデックスをコピー開始位置として、1 次元の Array インスタンスにコレクション オブジェクトをコピーします。
パブリック メソッド Equals  オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。)
パブリック メソッド GetEnumerator  CollectionBase インスタンスを反復処理する列挙子を返します。 ( CollectionBase から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。)
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 ( Object から継承されます。)
パブリック メソッド IndexOf 指定した CodeCatchClause がコレクション内に存在する場合は、コレクション内でのそのインデックスを取得します。
パブリック メソッド Insert コレクション内の指定したインデックス位置に、指定した CodeCatchClause を挿入します。
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。)
パブリック メソッド Remove 指定した CodeCatchClause をコレクションから削除します。
パブリック メソッド RemoveAt  CollectionBase インスタンスの指定したインデックスにある要素を削除します。このメソッドはオーバーライドできません。 ( CollectionBase から継承されます。)
パブリック メソッド ToString  現在の Object を表す String を返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
  名前 説明
プロテクト メソッド Finalize  Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。)
プロテクト メソッド MemberwiseClone  現在の Object の簡易コピーを作成します。 ( Object から継承されます。)
プロテクト メソッド OnClear  CollectionBase インスタンスの内容を消去するときに、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnClearComplete  CollectionBase インスタンスの内容を消去した後に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnInsert  CollectionBase インスタンスに新しい要素を挿入する前に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnInsertComplete  CollectionBase インスタンスに新しい要素を挿入した後に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnRemove  CollectionBase インスタンスから要素を削除するときに、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnRemoveComplete  CollectionBase インスタンスから要素を削除した後に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnSet  CollectionBase インスタンスに値を設定する前に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnSetComplete  CollectionBase インスタンスに値を設定した後に、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnValidate  値を検証するときに、追加のカスタム プロセスを実行します。 ( CollectionBase から継承されます。)
参照参照

関連項目

CodeCatchClauseCollection クラス
System.CodeDom 名前空間
CodeCatchClause クラス

CodeCatchClauseCollection メンバ

CodeCatchClause オブジェクトのコレクションを表します。

CodeCatchClauseCollection データ型で公開されるメンバを以下の表に示します。


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド CodeCatchClauseCollection オーバーロードされます。 CodeCatchClauseCollection クラスの新しいインスタンスを初期化します。
パブリック プロパティパブリック プロパティ
( プロテクト プロパティ も参照)
  名前 説明
パブリック プロパティ Capacity  CollectionBase に格納できる要素の数を取得または設定します。(CollectionBase から継承されます。)
パブリック プロパティ Count  CollectionBase インスタンスに格納されている要素の数を取得します。このプロパティはオーバーライドできません。(CollectionBase から継承されます。)
パブリック プロパティ Item コレクション内の指定したインデックスでの CodeCatchClause を取得または設定します。
プロテクト プロパティプロテクト プロパティ
  名前 説明
プロテクト プロパティ InnerList  CollectionBase インスタンス内の要素のリストを格納する ArrayList を取得します。(CollectionBase から継承されます。)
プロテクト プロパティ List  CollectionBase インスタンス内の要素のリストを格納する IList を取得します。(CollectionBase から継承されます。)
パブリック メソッドパブリック メソッド
( プロテクト メソッド も参照)
  名前 説明
パブリック メソッド Add 指定した CodeCatchClause をコレクションに追加します。
パブリック メソッド AddRange オーバーロードされます。 指定した CodeCatchClause 配列の要素をコレクションの末尾にコピーします。
パブリック メソッド Clear  CollectionBase インスタンスからすべてのオブジェクトを削除します。このメソッドはオーバーライドできません。 (CollectionBase から継承されます。)
パブリック メソッド Contains 指定した CodeCatchClause がコレクションに格納されているかどうかを示す値を取得します。
パブリック メソッド CopyTo 指定したインデックスをコピー開始位置として、1 次元の Array インスタンスにコレクション オブジェクトをコピーします。
パブリック メソッド Equals  オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。)
パブリック メソッド GetEnumerator  CollectionBase インスタンスを反復処理する列挙子を返します。 (CollectionBase から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。)
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 (Object から継承されます。)
パブリック メソッド IndexOf 指定した CodeCatchClause がコレクション内に存在する場合は、コレクション内でのそのインデックスを取得します。
パブリック メソッド Insert コレクション内の指定したインデックス位置に、指定した CodeCatchClause を挿入します。
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。)
パブリック メソッド Remove 指定した CodeCatchClause をコレクションから削除します。
パブリック メソッド RemoveAt  CollectionBase インスタンスの指定したインデックスにある要素を削除します。このメソッドはオーバーライドできません。 (CollectionBase から継承されます。)
パブリック メソッド ToString  現在の Object を表す String を返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
  名前 説明
プロテクト メソッド Finalize  Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。)
プロテクト メソッド MemberwiseClone  現在の Object の簡易コピーを作成します。 (Object から継承されます。)
プロテクト メソッド OnClear  CollectionBase インスタンスの内容を消去するときに、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnClearComplete  CollectionBase インスタンスの内容を消去した後に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnInsert  CollectionBase インスタンスに新しい要素を挿入する前に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnInsertComplete  CollectionBase インスタンスに新しい要素を挿入した後に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnRemove  CollectionBase インスタンスから要素を削除するときに、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnRemoveComplete  CollectionBase インスタンスから要素を削除した後に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnSet  CollectionBase インスタンスに値を設定する前に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnSetComplete  CollectionBase インスタンスに値を設定した後に、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnValidate  値を検証するときに、追加のカスタム プロセスを実行します。 (CollectionBase から継承されます。)
参照参照

関連項目

CodeCatchClauseCollection クラス
System.CodeDom 名前空間
CodeCatchClause クラス



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「CodeCatchClauseCollection」の関連用語

CodeCatchClauseCollectionのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



CodeCatchClauseCollectionのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS