TypeBuilder.DefineEvent メソッドとは? わかりやすく解説

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

TypeBuilder.DefineEvent メソッド

指定した名前、属性、およびイベントの種類を使用して、新しいイベントを型に追加します。

名前空間: System.Reflection.Emit
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Function DefineEvent ( _
    name As String, _
    attributes As EventAttributes, _
    eventtype As Type _
) As EventBuilder
Dim instance As TypeBuilder
Dim name As String
Dim attributes As EventAttributes
Dim eventtype As Type
Dim returnValue As EventBuilder

returnValue = instance.DefineEvent(name, attributes, eventtype)
public EventBuilder DefineEvent (
    string name,
    EventAttributes attributes,
    Type eventtype
)
public:
EventBuilder^ DefineEvent (
    String^ name, 
    EventAttributes attributes, 
    Type^ eventtype
)
public EventBuilder DefineEvent (
    String name, 
    EventAttributes attributes, 
    Type eventtype
)
public function DefineEvent (
    name : String, 
    attributes : EventAttributes, 
    eventtype : Type
) : EventBuilder

パラメータ

name

イベントの名前。name には埋め込み null を含めることができません。

attributes

イベントの属性。

eventtype

イベントの型。

戻り値
定義されたイベント。

例外例外
例外の種類条件

ArgumentException

name の長さが 0 です。

ArgumentNullException

name が null 参照 (Visual Basic では Nothing) です。

または

eventtype が null 参照 (Visual Basic では Nothing) です。

InvalidOperationException

この型は、CreateType を使用して既に作成されています。

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



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「TypeBuilder.DefineEvent メソッド」の関連用語

TypeBuilder.DefineEvent メソッドのお隣キーワード
検索ランキング

   

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



TypeBuilder.DefineEvent メソッドのページの著作権

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

©2026 GRAS Group, Inc.RSS