ScriptObject.GetMethod ScriptObject.GetMethod ScriptObject.GetMethod ScriptObject.GetMethod Method

Definition

Gets a method that has a specified name.

Overloads

GetMethod(String, BindingFlags) GetMethod(String, BindingFlags) GetMethod(String, BindingFlags) GetMethod(String, BindingFlags)

Gets a method that has the specified name.

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

Gets a method that has the specified name by using the specified selection criteria.

GetMethod(String, BindingFlags) GetMethod(String, BindingFlags) GetMethod(String, BindingFlags) GetMethod(String, BindingFlags)

Gets a method that has the specified name.

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

Parameters

name
String String String String

The name of the method to get.

bindingAttr
BindingFlags BindingFlags BindingFlags BindingFlags

A bitwise combination of the enumeration values that specifies how the search for members is conducted by reflection.

Returns

A method that has the specified name, or null if the script object does not contain the method.

Implements

See also

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

Gets a method that has the specified name by using the specified selection criteria.

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

Parameters

name
String String String String

The name of the method to search for.

bindingAttr
BindingFlags BindingFlags BindingFlags BindingFlags

A bitwise combination of the enumeration values that specifies how the search for members is conducted by reflection.

binder
Binder Binder Binder Binder

An object that performs type conversion from actual argument type to formal argument type.

types
Type[]

The parameter types that are used to locate a matching method.

modifiers
ParameterModifier[]

An array of parameter modifiers that enable binding to work with parameter signatures in which the types have been modified.

Returns

A method that has the specified name, or null if the script object does not contain the method.

Implements

See also

Applies to