Module.GetMethod Metodo

Definizione

Restituisce un metodo con i criteri specificati.

Overload

GetMethod(String)

Restituisce un metodo con il nome specificato.

GetMethod(String, Type[])

Restituisce un metodo che ha il nome e i tipi di parametro specificati.

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

Restituisce un metodo con nome, informazioni di associazione, convenzione di chiamata, tipi di parametro e modificatori specificati.

GetMethod(String)

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

Restituisce un metodo con il nome specificato.

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

Parametri

name
String

Nome del metodo.

Restituisce

Oggetto MethodInfo con il nome specificato oppure null se il metodo non esiste.

Eccezioni

name è null.

Si applica a

GetMethod(String, Type[])

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

Restituisce un metodo che ha il nome e i tipi di parametro specificati.

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

Parametri

name
String

Nome del metodo.

types
Type[]

Tipi di parametro da cercare.

Restituisce

Oggetto MethodInfo che soddisfa i criteri specificati, o null se il metodo non esiste.

Eccezioni

name è null, types è null o types (i) è null.

Si applica a

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

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

Restituisce un metodo con nome, informazioni di associazione, convenzione di chiamata, tipi di parametro e modificatori specificati.

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

Parametri

name
String

Nome del metodo.

bindingAttr
BindingFlags

Uno dei flag di bit BindingFlags usati per controllare la ricerca.

binder
Binder

Oggetto che implementa Binder, contenente le proprietà relative a questo metodo.

callConvention
CallingConventions

Convenzione di chiamata del metodo.

types
Type[]

Tipi di parametro da cercare.

modifiers
ParameterModifier[]

Matrice di modificatori di parametro usata per creare associazioni con le firme del parametro in cui sono stati modificati i tipi.

Restituisce

Oggetto MethodInfo che soddisfa i criteri specificati, o null se il metodo non esiste.

Eccezioni

name è null, types è null o types (i) è null.

Vedi anche

Si applica a