Module.GetMethod Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Restituisce un metodo con i criteri specificati.
Overload
| Nome | Descrizione |
|---|---|
| GetMethod(String) |
Restituisce un metodo con il nome specificato. |
| GetMethod(String, Type[]) |
Restituisce un metodo con il nome e i tipi di parametro specificati. |
| GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) |
Restituisce un metodo con il nome, le informazioni di associazione, la convenzione di chiamata e i tipi di parametro e i modificatori specificati. |
GetMethod(String)
Restituisce un metodo con il nome specificato.
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
Parametri
- name
- String
Nome del metodo.
Valori restituiti
Oggetto MethodInfo con il nome specificato o null se il metodo non esiste.
Eccezioni
name è null.
Si applica a
GetMethod(String, Type[])
Restituisce un metodo con 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);
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.
Valori restituiti
Oggetto MethodInfo in base ai criteri specificati o null se il metodo non esiste.
Eccezioni
nameè , types è nullnullo types (i) è null.
Si applica a
GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])
Restituisce un metodo con il nome, le informazioni di associazione, la convenzione di chiamata e i tipi di parametro e i 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);
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 BindingFlags flag di bit usati per controllare la ricerca.
- binder
- Binder
Oggetto che implementa Binder, contenente le proprietà correlate a questo metodo.
- callConvention
- CallingConventions
Convenzione di chiamata per il metodo .
- types
- Type[]
Tipi di parametro da cercare.
- modifiers
- ParameterModifier[]
Matrice di modificatori di parametri utilizzata per rendere l'associazione funzionante con le firme dei parametri in cui i tipi sono stati modificati.
Valori restituiti
Oggetto MethodInfo in base ai criteri specificati o null se il metodo non esiste.
Eccezioni
nameè , types è nullnullo types (i) è null.