Module.GetMethod Metoda
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Vrátí metodu, která má zadaná kritéria.
Přetížení
| Name | Description |
|---|---|
| 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)
- Zdroj:
- Module.cs
- Zdroj:
- Module.cs
- 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);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Methods might be removed")]
public System.Reflection.MethodInfo? GetMethod(string name);
public System.Reflection.MethodInfo GetMethod(string name);
public System.Reflection.MethodInfo? GetMethod(string name);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Methods might be removed")>]
member this.GetMethod : string -> System.Reflection.MethodInfo
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.
- Atributy
Výjimky
name je null.
Platí pro
GetMethod(String, Type[])
- Zdroj:
- Module.cs
- Zdroj:
- Module.cs
- 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);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Methods might be removed")]
public System.Reflection.MethodInfo? GetMethod(string name, Type[] types);
public System.Reflection.MethodInfo GetMethod(string name, Type[] types);
public System.Reflection.MethodInfo? GetMethod(string name, Type[] types);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Methods might be removed")>]
member this.GetMethod : string * Type[] -> System.Reflection.MethodInfo
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
Objekt MethodInfo v souladu se zadanými kritérii nebo null pokud metoda neexistuje.
- Atributy
Výjimky
nameis null, is , types or nulltypes(i) is null.
Platí pro
GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])
- Zdroj:
- Module.cs
- Zdroj:
- Module.cs
- 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 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);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Methods might be removed")]
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);
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);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Methods might be removed")>]
member this.GetMethod : string * System.Reflection.BindingFlags * System.Reflection.Binder * System.Reflection.CallingConventions * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.MethodInfo
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žitých k řízení hledá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 práci s vazbami 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.
- Atributy
Výjimky
nameis null, is , types or nulltypes(i) is null.