TypeInfo.GetDeclaredMethod(String) 方法

定義

傳回 物件,表示目前型別所宣告的指定方法。

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

參數

name
String

方法的名稱。

傳回

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

例外狀況

namenull

適用於