RuntimeReflectionExtensions.GetRuntimeEvent(Type, String) RuntimeReflectionExtensions.GetRuntimeEvent(Type, String) RuntimeReflectionExtensions.GetRuntimeEvent(Type, String) Method

定义

检索表示指定的事件的对象。Retrieves an object that represents the specified event.

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);
static member GetRuntimeEvent : Type * string -> System.Reflection.EventInfo

参数

type
Type Type Type

包含事件的类型。The type that contains the event.

name
String String String

事件的名称。The name of the event.

返回

一个对象,表示指定的事件,或null如果找不到该事件。An object that represents the specified event, or null if the event is not found.

异常

typenulltype is null.

-or-

namenullname is null.

适用于

另请参阅