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 a modifikátory parametrů.

GetMethod(String)

Zdroj:
Module.cs
Zdroj:
Module.cs
Zdroj:
Module.cs

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

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

Výjimky

name je null.

Platí pro

GetMethod(String, Type[])

Zdroj:
Module.cs
Zdroj:
Module.cs
Zdroj:
Module.cs

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é se mají hledat.

Návraty

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

Výjimky

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

Platí pro

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

Zdroj:
Module.cs
Zdroj:
Module.cs
Zdroj:
Module.cs

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

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 bitových BindingFlags příznaků, které se používají 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é se mají hledat.

modifiers
ParameterModifier[]

Pole modifikátorů parametrů, které slouží k tomu, aby vazba fungovala s podpisy parametrů, ve kterých byly typy změněny.

Návraty

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

Výjimky

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

Viz také

Platí pro