RuntimeReflectionExtensions.GetRuntimeEvents(Type) RuntimeReflectionExtensions.GetRuntimeEvents(Type) RuntimeReflectionExtensions.GetRuntimeEvents(Type) Method

定义

检索表示指定类型定义的所有事件的集合。Retrieves a collection that represents all the events defined on a specified type.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<System::Reflection::EventInfo ^> ^ GetRuntimeEvents(Type ^ type);
public static System.Collections.Generic.IEnumerable<System.Reflection.EventInfo> GetRuntimeEvents (this Type type);
static member GetRuntimeEvents : Type -> seq<System.Reflection.EventInfo>

参数

type
Type Type Type

包含该事件的类型。The type that contains the events.

返回

指定类型的事件集合。A collection of events for the specified type.

异常

注解

此方法返回在指定类型上定义的所有事件, 包括继承的、非公共的、实例和静态事件。This method returns all events defined on the specified type, including inherited, non-public, instance, and static events.

适用于

另请参阅