RuntimeReflectionExtensions.GetRuntimeEvent(Type, String) 方法

定義

擷取表示指定之事件的物件。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Reflection::EventInfo ^ GetRuntimeEvent(Type ^ type, System::String ^ name);
public static System.Reflection.EventInfo GetRuntimeEvent (this Type type, string name);
public static System.Reflection.EventInfo? GetRuntimeEvent (this Type type, string name);
static member GetRuntimeEvent : Type * string -> System.Reflection.EventInfo
<Extension()>
Public Function GetRuntimeEvent (type As Type, name As String) As EventInfo

參數

type
Type

包含事件的型別。

name
String

事件的名稱。

傳回

物件,表示指定的事件,如果找不到事件,則為 null

例外狀況

typenull

-或-

namenull

適用於

另請參閱