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

EventDescriptor クラス

イベントに関する情報提供します

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

<ComVisibleAttribute(True)> _
Public MustInherit Class
 EventDescriptor
    Inherits MemberDescriptor
Dim instance As EventDescriptor
[ComVisibleAttribute(true)] 
public abstract class EventDescriptor : MemberDescriptor
[ComVisibleAttribute(true)] 
public ref class EventDescriptor abstract :
 public MemberDescriptor
/** @attribute ComVisibleAttribute(true) */ 
public abstract class EventDescriptor extends
 MemberDescriptor
ComVisibleAttribute(true) 
public abstract class EventDescriptor extends
 MemberDescriptor
解説解説

EventDescriptor は、イベントの名前、属性関連付ける対象コンポーネントイベント デリゲートデリゲートの型、およびデリゲートマルチキャストかどうかを示す値で構成されます。

EventDescriptor は、次の abstractプロパティメソッド提供します

イベント詳細については、「イベントの発生」を参照してくださいリフレクション詳細については、リフレクショントピック参照してください

メモメモ

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

使用例使用例

EventDescriptorCollection クラスの例に基づいて構築されているコード例次に示しますテキスト ボックス内のボタンの各イベントに関する情報 (カテゴリ説明、および表示名) を出力します。この例では、button1textbox1フォーム上でインスタンス化されていることが必要です。

Dim events As EventDescriptorCollection = TypeDescriptor.GetEvents(Button1)
' Displays each event's information in the collection in a text box.
Dim myEvent As EventDescriptor
For Each myEvent In events
    TextBox1.Text &= myEvent.Category & ControlChars.Cr
    TextBox1.Text &= myEvent.Description & ControlChars.Cr
    TextBox1.Text &= myEvent.DisplayName & ControlChars.Cr
Next myEvent
EventDescriptorCollection events = TypeDescriptor.GetEvents(button1);
// Displays each event's information in the collection in a text box.
foreach (System.ComponentModel.EventDescriptor myEvent in
 events) {
    textBox1.Text += myEvent.Category + '\n';
    textBox1.Text += myEvent.Description + '\n';
    textBox1.Text += myEvent.DisplayName + '\n';
}
EventDescriptorCollection^ events = TypeDescriptor::GetEvents( button1 );

// Displays each event's information in the collection in a text box.
for each (EventDescriptor^ myEvent in events)
 {
    textBox1->Text += myEvent->Category + '\n';
    textBox1->Text += myEvent->Description + '\n';
    textBox1->Text += myEvent->DisplayName + '\n';
}
EventDescriptorCollection events = TypeDescriptor.GetEvents(button1);
System.ComponentModel.EventDescriptor myEvent = null;
// Displays each event's information in the collection in a text box.
for (int iCtr=0; iCtr < events.get_Count();
 iCtr++) {
    myEvent = events.get_Item(iCtr);
    textBox1.set_Text(textBox1.get_Text() + myEvent.get_Category()
        + '\n');
    textBox1.set_Text(textBox1.get_Text() + myEvent.get_Description() 
        + '\n');
    textBox1.set_Text(textBox1.get_Text() + myEvent.get_DisplayName()
        + '\n');
}
継承階層継承階層
System.Object
   System.ComponentModel.MemberDescriptor
    System.ComponentModel.EventDescriptor
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

「EventDescriptor クラス」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS