RuntimeReflectionExtensions.GetRuntimeMethod(Type, String, Type[]) RuntimeReflectionExtensions.GetRuntimeMethod(Type, String, Type[]) RuntimeReflectionExtensions.GetRuntimeMethod(Type, String, Type[]) Method

定義

擷取表示指定之方法的物件。Retrieves an object that represents a specified method.

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);
static member GetRuntimeMethod : Type * string * Type[] -> System.Reflection.MethodInfo

參數

type
Type Type Type

包含方法的型別。The type that contains the method.

name
String String String

方法的名稱。The name of the method.

parameters
Type[]

陣列,其中包含方法的參數。An array that contains the method's parameters.

傳回

物件,表示指定的方法,如果找不到方法,則為 nullAn object that represents the specified method, or null if the method is not found.

例外狀況

typenulltype is null.

-或--or-

namenullname is null.

找到一個以上具有指定名稱的方法。More than one method is found with the specified name.

適用於

另請參閱