Module.GetMethod Metoda

Definice

Vrátí metodu se zadanými kritérii.

Přetížení

GetMethod(String)

Vrátí metodu se zadaným názvem.

GetMethod(String, Type[])

Vrátí metodu se zadaným názvem a typy parametrů.

GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

Vrátí metodu se zadaným názvem, informacemi o vazbě, konvencí volání a typy parametrů a modifikátory.

GetMethod(String)

Vrátí metodu se zadaným názvem.

public:
 System::Reflection::MethodInfo ^ GetMethod(System::String ^ name);
public System.Reflection.MethodInfo? GetMethod (string name);
public System.Reflection.MethodInfo GetMethod (string name);
member this.GetMethod : string -> System.Reflection.MethodInfo
Public Function GetMethod (name As String) As MethodInfo

Parametry

name
String

Název metody.

Návraty

MethodInfo

Objekt MethodInfo se zadaným názvem nebo null pokud metoda neexistuje.

Výjimky

name je null.

Platí pro

GetMethod(String, Type[])

Vrátí metodu se zadaným názvem a typy parametrů.

public:
 System::Reflection::MethodInfo ^ GetMethod(System::String ^ name, cli::array <Type ^> ^ types);
public System.Reflection.MethodInfo? GetMethod (string name, Type[] types);
public System.Reflection.MethodInfo GetMethod (string name, Type[] types);
member this.GetMethod : string * Type[] -> System.Reflection.MethodInfo
Public Function GetMethod (name As String, types As Type()) As MethodInfo

Parametry

name
String

Název metody.

types
Type[]

Typy parametrů, které chcete vyhledat.

Návraty

MethodInfo

Objekt MethodInfo v souladu se zadanými kritérii nebo pokud metoda null neexistuje.

Výjimky

name je null , je nebo types null types (i) je null .

Platí pro

GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

Vrátí metodu se zadaným názvem, informacemi o vazbě, konvencí volání a typy parametrů a modifikátory.

public:
 System::Reflection::MethodInfo ^ GetMethod(System::String ^ name, System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, System::Reflection::CallingConventions callConvention, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
public System.Reflection.MethodInfo? GetMethod (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, System.Reflection.CallingConventions callConvention, Type[] types, System.Reflection.ParameterModifier[]? modifiers);
public System.Reflection.MethodInfo GetMethod (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, Type[] types, System.Reflection.ParameterModifier[] modifiers);
member this.GetMethod : string * System.Reflection.BindingFlags * System.Reflection.Binder * System.Reflection.CallingConventions * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.MethodInfo
Public Function GetMethod (name As String, bindingAttr As BindingFlags, binder As Binder, callConvention As CallingConventions, types As Type(), modifiers As ParameterModifier()) As MethodInfo

Parametry

name
String

Název metody.

bindingAttr
BindingFlags

Jeden z BindingFlags bitových příznaků používaných k řízení vyhledávání.

binder
Binder

Objekt, který implementuje Binder , obsahující vlastnosti související s touto metodou.

callConvention
CallingConventions

Konvence volání pro metodu .

types
Type[]

Typy parametrů, které chcete vyhledat.

modifiers
ParameterModifier[]

Pole modifikátorů parametrů, které slouží k vytvoření vazby s podpisy parametrů, ve kterých byly typy změněny.

Návraty

MethodInfo

Objekt MethodInfo v souladu se zadanými kritérii nebo pokud metoda null neexistuje.

Výjimky

name je null , je nebo types null types (i) je null .

Viz také

Platí pro