TypeDelegator.GetEvents 方法

定义

返回 EventInfo 对象的数组,这些对象表示由当前 TypeDelegator 声明或继承的所有公共事件。Returns an array of EventInfo objects representing all the public events declared or inherited by the current TypeDelegator.

重载

GetEvents()

返回 EventInfo 对象的数组,这些对象表示由当前 TypeDelegator 声明或继承的所有公共事件。Returns an array of EventInfo objects representing all the public events declared or inherited by the current TypeDelegator.

GetEvents(BindingFlags)

返回 bindingAttr 中指定的由当前 TypeDelegator 声明或继承的事件。Returns the events specified in bindingAttr that are declared or inherited by the current TypeDelegator.

GetEvents()

返回 EventInfo 对象的数组,这些对象表示由当前 TypeDelegator 声明或继承的所有公共事件。Returns an array of EventInfo objects representing all the public events declared or inherited by the current TypeDelegator.

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()

返回

一个数组,其中包含当前类型声明或继承的所有事件。An array that contains all the events declared or inherited by the current type. 如果没有事件,则返回空数组。If there are no events, an empty array is returned.

GetEvents(BindingFlags)

返回 bindingAttr 中指定的由当前 TypeDelegator 声明或继承的事件。Returns the events specified in bindingAttr that are declared or inherited by the current TypeDelegator.

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

影响执行搜索的方式的位掩码。A bitmask that affects the way in which the search is conducted. 该值是零个或多个来自 BindingFlags 的位标志的组合。The value is a combination of zero or more bit flags from BindingFlags.

返回

EventInfo 类型的数组,包含 bindingAttr 中指定的事件。An array of type EventInfo containing the events specified in bindingAttr. 如果没有事件,则返回空数组。If there are no events, an empty array is returned.

适用于