IReflectGetMethod Method (String, BindingFlags, Binder, Type, ParameterModifier) |
Retrieves a
MethodInfo object corresponding to a specified method, using a
Type array to choose from among overloaded methods.
Namespace: System.ReflectionAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax MethodInfo GetMethod(
string name,
BindingFlags bindingAttr,
Binder binder,
Type[] types,
ParameterModifier[] modifiers
)
Parameters
- name
- Type: SystemString
The name of the member to find. - bindingAttr
- Type: System.ReflectionBindingFlags
The binding attributes used to control the search. - binder
- Type: System.ReflectionBinder
An object that implements Binder, containing properties related to this method. - types
- Type: SystemType
An array used to choose among overloaded methods. - modifiers
- Type: System.ReflectionParameterModifier
An array of parameter modifiers used to make binding work with parameter signatures in which the types have been modified.
Return Value
Type:
MethodInfoThe requested method that matches all the specified parameters.
Exceptions Exception | Condition |
---|
AmbiguousMatchException | The object implements multiple methods with the same name. |
See Also