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[]

包含方法的参数的数组。

返回

MethodInfo

表示指定方法的对象,若未找到该方法则为 null

例外

typenull

  • 或 -

namenull

找到了多个具有指定名称的方法。

适用于

另请参阅