EnumBuilder.GetEvent(String, BindingFlags) メソッド

定義

指定した名前のイベントを返します。

public:
 override System::Reflection::EventInfo ^ GetEvent(System::String ^ name, System::Reflection::BindingFlags bindingAttr);
public override System.Reflection.EventInfo? GetEvent (string name, System.Reflection.BindingFlags bindingAttr);
public override System.Reflection.EventInfo GetEvent (string name, System.Reflection.BindingFlags bindingAttr);
override this.GetEvent : string * System.Reflection.BindingFlags -> System.Reflection.EventInfo
Public Overrides Function GetEvent (name As String, bindingAttr As BindingFlags) As EventInfo

パラメーター

name
String

取得するイベントの名前。

bindingAttr
BindingFlags

この呼び出しの属性。 これは InvokeMethodNonPublic など、BindingFlags からのビット フラグでなければなりません。

戻り値

EventInfo

指定した名前の、この型によって宣言または継承されたイベントを表す EventInfo オブジェクトを返します。 一致するものがない場合、null が返されます。

例外

不完全な型では、このメソッドは現在サポートされていません。

注釈

回避策として、完成した型のイベントを取得するには、取得した型でリフレクションを使用またはAssembly.GetType使用してType.GetType型を取得します。

適用対象