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

備註

這個方法會傳回指定型別上定義的所有事件,包括繼承、非公用、實例和靜態事件。

適用於

另請參閱