TypeBuilder.DefineEvent(String, EventAttributes, Type) メソッド

定義

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

public:
 System::Reflection::Emit::EventBuilder ^ DefineEvent(System::String ^ name, System::Reflection::EventAttributes attributes, Type ^ eventtype);
public System.Reflection.Emit.EventBuilder DefineEvent(string name, System.Reflection.EventAttributes attributes, Type eventtype);
member this.DefineEvent : string * System.Reflection.EventAttributes * Type -> System.Reflection.Emit.EventBuilder
Public Function DefineEvent (name As String, attributes As EventAttributes, eventtype As Type) As EventBuilder

パラメーター

name
String

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

attributes
EventAttributes

イベントの属性。

eventtype
Type

イベントの種類。

返品

定義されたイベント。

例外

nameの長さは 0 です。

namenullです。

-または-

eventtypenullです。

この型は、以前に CreateType() を使用して作成されました。

適用対象