Module.GetMethod Método

Definición

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)

Source:
Module.cs
Source:
Module.cs
Source:
Module.cs
Source:
Module.cs
Source:
Module.cs

Devuelve un método que tiene el nombre especificado.

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

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.

Atributos

Excepciones

name es null.

Se aplica a

GetMethod(String, Type[])

Source:
Module.cs
Source:
Module.cs
Source:
Module.cs
Source:
Module.cs
Source:
Module.cs

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);
[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

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.

Atributos

Excepciones

namees , null es typesnullo types (i) es null.

Se aplica a

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

Source:
Module.cs
Source:
Module.cs
Source:
Module.cs
Source:
Module.cs
Source:
Module.cs

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);
[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

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.

Atributos

Excepciones

namees , null es typesnullo types (i) es null.

Consulte también

Se aplica a