EventDescriptorCollection クラス
アセンブリ: System (system.dll 内)

<ComVisibleAttribute(True)> _ Public Class EventDescriptorCollection Implements IList, ICollection, IEnumerable
[ComVisibleAttribute(true)] public class EventDescriptorCollection : IList, ICollection, IEnumerable
[ComVisibleAttribute(true)] public ref class EventDescriptorCollection : IList, ICollection, IEnumerable

EventDescriptorCollection は読み取り専用であり、イベントを追加または削除するためのメソッドは実装していません。これらのメソッドを実装するには、このクラスから継承する必要があります。
EventDescriptorCollection クラスで利用できるプロパティを使用して、コレクションに対してその内容を照会できます。コレクション内の要素の数を確認するには、Count プロパティを使用します。インデックス番号または名前で指定したプロパティを取得するには、Item プロパティを使用します。
また、Find メソッドを使用して、指定した名前のイベントの説明をコレクションから取得できます。
![]() |
---|
このクラスに適用される HostProtectionAttribute 属性の Resources プロパティの値は、Synchronization です。HostProtectionAttribute は、デスクトップ アプリケーション (一般的には、アイコンをダブルクリック、コマンドを入力、またはブラウザに URL を入力して起動するアプリケーション) には影響しません。詳細については、HostProtectionAttribute クラスのトピックまたは「SQL Server プログラミングとホスト保護属性」を参照してください。 |

ボタンにかかわるイベントをすべてテキスト ボックスに出力するコード例を次に示します。この例では、button1 と textBox1 がフォーム上でインスタンス化されていることが必要です。
Private Sub MyEventCollection() ' Creates a new collection and assigns it the events for button1. Dim events As EventDescriptorCollection = TypeDescriptor.GetEvents(button1) ' Displays each event in the collection in a text box. Dim myEvent As EventDescriptor For Each myEvent In events textBox1.Text &= myEvent.Name & ControlChars.Cr Next myEvent End Sub 'MyEventCollection
private void MyEventCollection() { // Creates a new collection and assigns it the events for button1. EventDescriptorCollection events = TypeDescriptor.GetEvents(button1); // Displays each event in the collection in a text box. foreach (EventDescriptor myEvent in events) textBox1.Text += myEvent.Name + '\n'; }
private: void MyEventCollection() { // Creates a new collection and assigns it the events for button1. EventDescriptorCollection^ events = TypeDescriptor::GetEvents( button1 ); // Displays each event in the collection in a text box. for each ( EventDescriptor^ myEvent in events ) { textBox1->Text = String::Concat( textBox1->Text, myEvent->Name, "\n" ); } }
private void MyEventCollection() { // Creates a new collection and assigns it the events for button1. EventDescriptorCollection events = TypeDescriptor.GetEvents(button1); for (int iCtr = 0; iCtr < events.get_Count(); iCtr++) { EventDescriptor myEvent = events.get_Item(iCtr); // Displays each event in the collection in a text box. textBox1.set_Text(textBox1.get_Text() + myEvent.get_Name() + '\n'); } } //MyEventCollection

System.ComponentModel.EventDescriptorCollection


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


EventDescriptorCollection コンストラクタ (EventDescriptor[])
アセンブリ: System (system.dll 内)


events パラメータが空の場合、このコンストラクタは空の EventDescriptorCollection クラスを作成します。
このメンバに適用される HostProtectionAttribute 属性の Resources プロパティの値は、Synchronization です。HostProtectionAttribute は、デスクトップ アプリケーション (一般的には、アイコンをダブルクリック、コマンドを入力、またはブラウザに URL を入力して起動するアプリケーション) には影響しません。詳細については、HostProtectionAttribute クラスのトピックまたは「SQL Server プログラミングとホスト保護属性」を参照してください。

button1 のイベントを使用して、新しい EventDescriptorCollection クラスを作成するコード例を次に示します。この例では、button1 がフォーム上でインスタンス化されていることが必要です。

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


EventDescriptorCollection コンストラクタ

名前 | 説明 |
---|---|
EventDescriptorCollection (EventDescriptor[]) | EventDescriptor オブジェクトの配列を指定して、EventDescriptorCollection クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |
EventDescriptorCollection (EventDescriptor[], Boolean) | EventDescriptor オブジェクトの配列を指定して、EventDescriptorCollection クラスの新しいインスタンスを初期化します。このコレクションは、オプションで読み取り専用にできます。 |

関連項目
EventDescriptorCollection クラスEventDescriptorCollection メンバ
System.ComponentModel 名前空間
EventDescriptor クラス
TypeDescriptor
EventDescriptorCollection コンストラクタ (EventDescriptor[], Boolean)
アセンブリ: System (system.dll 内)

Dim events As EventDescriptor() Dim readOnly As Boolean Dim instance As New EventDescriptorCollection(events, readOnly)

events パラメータが空の場合、このコンストラクタは空の EventDescriptorCollection クラスを作成します。
![]() |
---|
このクラスに適用される HostProtectionAttribute 属性の Resources プロパティの値は、Synchronization です。HostProtectionAttribute は、デスクトップ アプリケーション (一般的には、アイコンをダブルクリック、コマンドを入力、またはブラウザに URL を入力して起動するアプリケーション) には影響しません。詳細については、HostProtectionAttribute クラスのトピックまたは「SQL Server プログラミングとホスト保護属性」を参照してください。 |

button1 のイベントを使用して、新しい EventDescriptorCollection クラスを作成するコード例を次に示します。この例では、button1 がフォーム上でインスタンス化されていることが必要です。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


EventDescriptorCollection フィールド
EventDescriptorCollection プロパティ
EventDescriptorCollection メソッド

名前 | 説明 | |
---|---|---|
![]() | Add | コレクションの末尾に EventDescriptor を追加します。 |
![]() | Clear | コレクションからすべてのオブジェクトを削除します。 |
![]() | Contains | 指定した EventDescriptor がコレクションに格納されているかどうかを示す値を返します。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | Find | コレクション内の指定した名前を持つイベントの説明を取得します。 |
![]() | GetEnumerator | EventDescriptorCollection の列挙子を取得します。 |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | IndexOf | 指定した EventDescriptor のインデックスを返します。 |
![]() | Insert | コレクション内の指定したインデックス位置に EventDescriptor を挿入します。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | Remove | 指定した EventDescriptor をコレクションから削除します。 |
![]() | RemoveAt | 指定したインデックス位置にある EventDescriptor をコレクションから削除します。 |
![]() | Sort | オーバーロードされます。 EventDescriptorCollection のメンバを並べ替えます。 |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | InternalSort | オーバーロードされます。 EventDescriptorCollection のメンバを並べ替えます。 |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | System.Collections.ICollection.CopyTo | コレクションの要素を Array にコピーします。Array の特定のインデックスからコピーが開始されます。 |
![]() | System.Collections.IEnumerable.GetEnumerator | コレクションを反復処理する列挙子を返します。 |
![]() | System.Collections.IList.Add | 項目をコレクションに追加します。 |
![]() | System.Collections.IList.Clear | コレクションからすべての項目を削除します。 |
![]() | System.Collections.IList.Contains | コレクションに特定の値が格納されているかどうかを判断します。 |
![]() | System.Collections.IList.IndexOf | コレクション内での指定した項目のインデックスを調べます。 |
![]() | System.Collections.IList.Insert | コレクション内の指定したインデックスの位置に項目を挿入します。 |
![]() | System.Collections.IList.Remove | 最初に見つかった特定のオブジェクトをコレクションから削除します。 |
![]() | System.Collections.IList.RemoveAt | 指定したインデックスにある項目を削除します。 |

EventDescriptorCollection メンバ
EventDescriptor オブジェクトのコレクションを表します。
EventDescriptorCollection データ型で公開されるメンバを以下の表に示します。




名前 | 説明 | |
---|---|---|
![]() | Add | コレクションの末尾に EventDescriptor を追加します。 |
![]() | Clear | コレクションからすべてのオブジェクトを削除します。 |
![]() | Contains | 指定した EventDescriptor がコレクションに格納されているかどうかを示す値を返します。 |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | Find | コレクション内の指定した名前を持つイベントの説明を取得します。 |
![]() | GetEnumerator | EventDescriptorCollection の列挙子を取得します。 |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | IndexOf | 指定した EventDescriptor のインデックスを返します。 |
![]() | Insert | コレクション内の指定したインデックス位置に EventDescriptor を挿入します。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | Remove | 指定した EventDescriptor をコレクションから削除します。 |
![]() | RemoveAt | 指定したインデックス位置にある EventDescriptor をコレクションから削除します。 |
![]() | Sort | オーバーロードされます。 EventDescriptorCollection のメンバを並べ替えます。 |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | InternalSort | オーバーロードされます。 EventDescriptorCollection のメンバを並べ替えます。 |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | System.Collections.ICollection.CopyTo | コレクションの要素を Array にコピーします。Array の特定のインデックスからコピーが開始されます。 |
![]() | System.Collections.IEnumerable.GetEnumerator | コレクションを反復処理する列挙子を返します。 |
![]() | System.Collections.IList.Add | 項目をコレクションに追加します。 |
![]() | System.Collections.IList.Clear | コレクションからすべての項目を削除します。 |
![]() | System.Collections.IList.Contains | コレクションに特定の値が格納されているかどうかを判断します。 |
![]() | System.Collections.IList.IndexOf | コレクション内での指定した項目のインデックスを調べます。 |
![]() | System.Collections.IList.Insert | コレクション内の指定したインデックスの位置に項目を挿入します。 |
![]() | System.Collections.IList.Remove | 最初に見つかった特定のオブジェクトをコレクションから削除します。 |
![]() | System.Collections.IList.RemoveAt | 指定したインデックスにある項目を削除します。 |
![]() | System.Collections.IList.Item | 指定したインデックスにある要素を取得または設定します。 |

Weblioに収録されているすべての辞書からEventDescriptorCollectionを検索する場合は、下記のリンクをクリックしてください。

- EventDescriptorCollectionのページへのリンク