TypeBuilder.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);
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

検索を制限する BindingFlags 値のビットごとの組み合わせ。

返品

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

例外

このメソッドは、不完全な型には実装されません。

注釈

Type.GetTypeまたはAssembly.GetTypeを使用して型を取得し、取得した型にリフレクションを使用します。

適用対象