ScriptObject.GetMethod Metodo
Definizione
Ottiene un metodo con un nome specificato.Gets a method that has a specified name.
Overload
GetMethod(String, BindingFlags) |
Questa API supporta l'infrastruttura del prodotto e non è previsto che venga usata direttamente dal codice. Ottiene un metodo con il nome specificato.Gets a method that has the specified name. |
GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]) |
Questa API supporta l'infrastruttura del prodotto e non è previsto che venga usata direttamente dal codice. Ottiene un metodo con il nome specificato utilizzando i criteri di selezione specificati.Gets a method that has the specified name by using the specified selection criteria. |
GetMethod(String, BindingFlags)
Ottiene un metodo con il nome specificato.Gets a method that has the specified name.
Questa API supporta l'infrastruttura del prodotto e non è previsto che venga usata direttamente dal codice.
public:
virtual System::Reflection::MethodInfo ^ GetMethod(System::String ^ name, System::Reflection::BindingFlags bindingAttr);
public System.Reflection.MethodInfo GetMethod (string name, System.Reflection.BindingFlags bindingAttr);
abstract member GetMethod : string * System.Reflection.BindingFlags -> System.Reflection.MethodInfo
override this.GetMethod : string * System.Reflection.BindingFlags -> System.Reflection.MethodInfo
Public Function GetMethod (name As String, bindingAttr As BindingFlags) As MethodInfo
Parametri
- name
- String
Nome del metodo da ottenere.The name of the method to get.
- bindingAttr
- BindingFlags
Combinazione bit per bit dei valori di enumerazione che specifica come la ricerca dei membri viene eseguita tramite reflection.A bitwise combination of the enumeration values that specifies how the search for members is conducted by reflection.
Restituisce
Metodo con l'oggetto name
specificato oppure null se l'oggetto script non contiene il metodo.A method that has the specified name
, or null if the script object does not contain the method.
Implementazioni
Vedi anche
Si applica a
GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[])
Ottiene un metodo con il nome specificato utilizzando i criteri di selezione specificati.Gets a method that has the specified name by using the specified selection criteria.
Questa API supporta l'infrastruttura del prodotto e non è previsto che venga usata direttamente dal codice.
public:
virtual System::Reflection::MethodInfo ^ GetMethod(System::String ^ name, System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, 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, Type[] types, System.Reflection.ParameterModifier[] modifiers);
abstract member GetMethod : string * System.Reflection.BindingFlags * System.Reflection.Binder * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.MethodInfo
override this.GetMethod : string * System.Reflection.BindingFlags * System.Reflection.Binder * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.MethodInfo
Public Function GetMethod (name As String, bindingAttr As BindingFlags, binder As Binder, types As Type(), modifiers As ParameterModifier()) As MethodInfo
Parametri
- name
- String
Nome del metodo da cercare.The name of the method to search for.
- bindingAttr
- BindingFlags
Combinazione bit per bit dei valori di enumerazione che specifica come la ricerca dei membri viene eseguita tramite reflection.A bitwise combination of the enumeration values that specifies how the search for members is conducted by reflection.
- binder
- Binder
Oggetto che esegue la conversione del tipo dal tipo di argomento effettivo al tipo di argomento formale.An object that performs type conversion from actual argument type to formal argument type.
- types
- Type[]
Tipi di parametro utilizzati per individuare un metodo corrispondente.The parameter types that are used to locate a matching method.
- modifiers
- ParameterModifier[]
Matrice di modificatori di parametro che consentono di utilizzare l'associazione con le firme di parametro in cui sono stati modificati i tipi.An array of parameter modifiers that enable binding to work with parameter signatures in which the types have been modified.
Restituisce
Metodo con l'oggetto name
specificato oppure null se l'oggetto script non contiene il metodo.A method that has the specified name
, or null if the script object does not contain the method.