TypeBuilder.GetEvents 方法

定义

返回由当前 TypeBuilder 定义的事件。

重载

GetEvents()

返回此类型声明或继承的公共事件。

GetEvents(BindingFlags)

返回此类型声明的公共和非公共事件。

GetEvents()

返回此类型声明或继承的公共事件。

public:
 override cli::array <System::Reflection::EventInfo ^> ^ GetEvents();
public override System.Reflection.EventInfo[] GetEvents ();
override this.GetEvents : unit -> System.Reflection.EventInfo[]
Public Overrides Function GetEvents () As EventInfo()

返回

EventInfo[]

返回表示此类型声明或继承的公共事件的 EventInfo 对象数组。 如果没有任何公共事件,则返回一个空数组。

例外

不会为不完整类型实现此方法。

注解

使用 或 检索 GetType 类型 GetType ,并使用所检索类型的反射。

适用于

GetEvents(BindingFlags)

返回此类型声明的公共和非公共事件。

public:
 override cli::array <System::Reflection::EventInfo ^> ^ GetEvents(System::Reflection::BindingFlags bindingAttr);
public override System.Reflection.EventInfo[] GetEvents (System.Reflection.BindingFlags bindingAttr);
override this.GetEvents : System.Reflection.BindingFlags -> System.Reflection.EventInfo[]
Public Overrides Function GetEvents (bindingAttr As BindingFlags) As EventInfo()

参数

bindingAttr
BindingFlags

用于限制搜索的 BindingFlags 值的按位组合。

返回

EventInfo[]

返回 EventInfo 对象的数组,表示此类型声明或继承的与指定的绑定标志匹配的事件。 如果没有匹配的事件,则返回空数组。

例外

不会为不完整类型实现此方法。

注解

使用 或 检索 Type.GetType 类型 Assembly.GetType ,并使用所检索类型的反射。

适用于