RuntimeReflectionExtensions.GetRuntimeMethod(Type, String, Type[]) 方法

定義

擷取表示指定之方法的物件。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Reflection::MethodInfo ^ GetRuntimeMethod(Type ^ type, System::String ^ name, cli::array <Type ^> ^ parameters);
public static System.Reflection.MethodInfo GetRuntimeMethod (this Type type, string name, Type[] parameters);
public static System.Reflection.MethodInfo? GetRuntimeMethod (this Type type, string name, Type[] parameters);
static member GetRuntimeMethod : Type * string * Type[] -> System.Reflection.MethodInfo
<Extension()>
Public Function GetRuntimeMethod (type As Type, name As String, parameters As Type()) As MethodInfo

參數

type
Type

包含方法的型別。

name
String

方法的名稱。

parameters
Type[]

陣列,其中包含方法的參數。

傳回

物件,表示指定的方法,如果找不到方法,則為 null

例外狀況

typenull

-或-

namenull

找到一個以上具有指定名稱的方法。

適用於

另請參閱