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

适用于

另请参阅