TypeGetMethod Method (String, BindingFlags) |
Searches for the specified method, using the specified binding constraints.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public MethodInfo GetMethod(
string name,
BindingFlags bindingAttr
)
Parameters
- name
- Type: SystemString
The string containing the name of the method to get. - bindingAttr
- Type: System.ReflectionBindingFlags
A bitmask comprised of one or more BindingFlags that specify how the search is conducted.-or- Zero, to return null.
Return Value
Type:
MethodInfoAn object representing the method that matches the specified requirements, if found; otherwise, null.
Implements
IReflectGetMethod(String, BindingFlags)Exceptions Exception | Condition |
---|
AmbiguousMatchException | More than one method is found with the specified name and matching the specified binding constraints. |
ArgumentNullException | name is null. |
See Also