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

事件的名称。

返回

EventInfo

表示指定事件的对象,若未找到该事件则为 null

例外

typenull

  • 或 -

namenull

适用于

另请参阅