EventDescriptorCollection クラスとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > EventDescriptorCollection クラスの意味・解説 

EventDescriptorCollection クラス

EventDescriptor オブジェクトコレクション表します

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

<ComVisibleAttribute(True)> _
Public Class EventDescriptorCollection
    Implements IList, ICollection, IEnumerable
Dim instance As EventDescriptorCollection
[ComVisibleAttribute(true)] 
public class EventDescriptorCollection : IList,
 ICollection, IEnumerable
[ComVisibleAttribute(true)] 
public ref class EventDescriptorCollection
 : IList, ICollection, IEnumerable
/** @attribute ComVisibleAttribute(true) */ 
public class EventDescriptorCollection implements
 IList, ICollection, 
    IEnumerable
ComVisibleAttribute(true) 
public class EventDescriptorCollection implements
 IList, ICollection, 
    IEnumerable
解説解説
使用例使用例

ボタンにかかわるイベントをすべてテキスト ボックス出力するコード例次に示します。この例では、button1textBox1フォーム上でインスタンス化されていることが必要です。

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.Object
  System.ComponentModel.EventDescriptorCollection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
EventDescriptorCollection メンバ
System.ComponentModel 名前空間
EventDescriptor クラス
TypeDescriptor


このページでは「.NET Framework クラス ライブラリ リファレンス」からEventDescriptorCollection クラスを検索した結果を表示しています。
Weblioに収録されているすべての辞書からEventDescriptorCollection クラスを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からEventDescriptorCollection クラス を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「EventDescriptorCollection クラス」の関連用語

EventDescriptorCollection クラスのお隣キーワード
検索ランキング

   

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



EventDescriptorCollection クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS