Module.GetMethod Metódus
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
A megadott feltételeknek megfelelő metódust ad vissza.
Túlterhelések
| Name | Description |
|---|---|
| GetMethod(String) |
A megadott névvel rendelkező metódust ad vissza. |
| GetMethod(String, Type[]) |
A megadott névvel és paramétertípusokkal rendelkező metódust ad vissza. |
| GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) |
A megadott névvel, kötési információkkal, hívási konvencióval és paramétertípusokkal és módosítókkal rendelkező metódust ad vissza. |
GetMethod(String)
- Forrás:
- Module.cs
- Forrás:
- Module.cs
- Forrás:
- Module.cs
- Forrás:
- Module.cs
- Forrás:
- Module.cs
A megadott névvel rendelkező metódust ad vissza.
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
Paraméterek
- name
- String
A módszer neve.
Válaszok
A MethodInfo megadott névvel rendelkező objektum, vagy null ha a metódus nem létezik.
- Attribútumok
Kivételek
name az null.
A következőre érvényes:
GetMethod(String, Type[])
- Forrás:
- Module.cs
- Forrás:
- Module.cs
- Forrás:
- Module.cs
- Forrás:
- Module.cs
- Forrás:
- Module.cs
A megadott névvel és paramétertípusokkal rendelkező metódust ad vissza.
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
Paraméterek
- name
- String
A módszer neve.
- types
- Type[]
A keresendő paramétertípusok.
Válaszok
A MethodInfo megadott feltételeknek megfelelő objektum, vagy null ha a metódus nem létezik.
- Attribútumok
Kivételek
name is null, types is nullvagy types (i) is null.
A következőre érvényes:
GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])
- Forrás:
- Module.cs
- Forrás:
- Module.cs
- Forrás:
- Module.cs
- Forrás:
- Module.cs
- Forrás:
- Module.cs
A megadott névvel, kötési információkkal, hívási konvencióval és paramétertípusokkal és módosítókkal rendelkező metódust ad vissza.
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
Paraméterek
- name
- String
A módszer neve.
- bindingAttr
- BindingFlags
BindingFlags A keresés vezérléséhez használt bitjelzők egyike.
- binder
- Binder
A metódushoz kapcsolódó tulajdonságokat tartalmazó, implementáló Binderobjektum.
- callConvention
- CallingConventions
A metódus hívási konvenciója.
- types
- Type[]
A keresendő paramétertípusok.
- modifiers
- ParameterModifier[]
Paramétermódosítók tömbje, amely lehetővé teszi, hogy a kötés olyan paraméter-aláírásokkal működjön, amelyekben a típusok módosultak.
Válaszok
A MethodInfo megadott feltételeknek megfelelő objektum, vagy null ha a metódus nem létezik.
- Attribútumok
Kivételek
name is null, types is nullvagy types (i) is null.