TypeInfo.GetDeclaredEvent(String) 方法

定义

返回一个对象,该对象表示由当前类型声明的指定事件。

public:
 virtual System::Reflection::EventInfo ^ GetDeclaredEvent(System::String ^ name);
public virtual System.Reflection.EventInfo GetDeclaredEvent (string name);
public virtual System.Reflection.EventInfo? GetDeclaredEvent (string name);
abstract member GetDeclaredEvent : string -> System.Reflection.EventInfo
override this.GetDeclaredEvent : string -> System.Reflection.EventInfo
Public Overridable Function GetDeclaredEvent (name As String) As EventInfo

参数

name
String

事件的名称。

返回

EventInfo

如果找到对象,则为表示指定的事件的对象;否则为 null

例外

namenull

适用于