RuntimeReflectionExtensions.GetRuntimeEvents(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>
<Extension()>
Public Function GetRuntimeEvents (type As Type) As IEnumerable(Of EventInfo)

参数

type
Type

包含该事件的类型。

返回

IEnumerable<EventInfo>

指定类型的事件集合。

例外

typenull

注解

此方法返回在指定类型上定义的所有事件,包括继承事件、非公共事件、实例和静态事件。

适用于

另请参阅