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

Definice

Načte objekt, který představuje zadanou metodu.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

Parametry

type
Type

Typ, který obsahuje metodu.The type that contains the method.

name
String

Název metodyThe name of the method.

parameters
Type[]

Pole, které obsahuje parametry metody.An array that contains the method's parameters.

Návraty

MethodInfo

Objekt, který představuje zadanou metodu, nebo null Pokud metoda nebyla nalezena.An object that represents the specified method, or null if the method is not found.

Výjimky

type je null.type is null.

-nebo--or-

name je null.name is null.

Je nalezeno více než jedna metoda se zadaným názvem.More than one method is found with the specified name.

Platí pro

Viz také