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

事件的名稱。

傳回

如果有找到則為代表指定之事件的物件;否則為 null

例外狀況

namenull

適用於