Module.GetMethod Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Devuelve un método que tiene los criterios especificados.
Sobrecargas
| Nombre | Description |
|---|---|
| GetMethod(String) |
Devuelve un método que tiene el nombre especificado. |
| GetMethod(String, Type[]) |
Devuelve un método que tiene el nombre y los tipos de parámetro especificados. |
| GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) |
Devuelve un método que tiene el nombre especificado, la información de enlace, la convención de llamada y los tipos y modificadores de parámetros especificados. |
GetMethod(String)
Devuelve un método que tiene el nombre especificado.
public:
System::Reflection::MethodInfo ^ GetMethod(System::String ^ name);
public System.Reflection.MethodInfo GetMethod(string name);
member this.GetMethod : string -> System.Reflection.MethodInfo
Public Function GetMethod (name As String) As MethodInfo
Parámetros
- name
- String
El nombre del método.
Devoluciones
Objeto MethodInfo que tiene el nombre especificado o null si el método no existe.
Excepciones
name es null.
Se aplica a
GetMethod(String, Type[])
Devuelve un método que tiene el nombre y los tipos de parámetro especificados.
public:
System::Reflection::MethodInfo ^ GetMethod(System::String ^ name, cli::array <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
Parámetros
- name
- String
El nombre del método.
- types
- Type[]
Los tipos de parámetro que se van a buscar.
Devoluciones
Objeto MethodInfo de acuerdo con los criterios especificados o null si el método no existe.
Excepciones
namees , types es nullnullo types (i) es null.
Se aplica a
GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])
Devuelve un método que tiene el nombre especificado, la información de enlace, la convención de llamada y los tipos y modificadores de parámetros especificados.
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);
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
Parámetros
- name
- String
El nombre del método.
- bindingAttr
- BindingFlags
Una de las BindingFlags marcas de bits usadas para controlar la búsqueda.
- binder
- Binder
Objeto que implementa , que contiene Binderpropiedades relacionadas con este método.
- callConvention
- CallingConventions
La convención de llamada para el método .
- types
- Type[]
Los tipos de parámetro que se van a buscar.
- modifiers
- ParameterModifier[]
Matriz de modificadores de parámetros usados para que el enlace funcione con firmas de parámetro en las que se han modificado los tipos.
Devoluciones
Objeto MethodInfo de acuerdo con los criterios especificados o null si el método no existe.
Excepciones
namees , types es nullnullo types (i) es null.