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.

适用于

另请参阅