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

Definition

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);
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

Parameters

type
Type

The type that contains the method.

name
String

The name of the method.

parameters
Type[]

An array that contains the method's parameters.

Returns

MethodInfo

An object that represents the specified method, or null if the method is not found.

Exceptions

type is null.

-or-

name is null.

More than one method is found with the specified name.

Applies to

See also