Click or drag to resize
TypeGetMethod Method (String, BindingFlags)
Searches for the specified method, using the specified binding constraints.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
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: MethodInfo
An object representing the method that matches the specified requirements, if found; otherwise, null.

Implements

IReflectGetMethod(String, BindingFlags)
Exceptions
ExceptionCondition
AmbiguousMatchExceptionMore than one method is found with the specified name and matching the specified binding constraints.
ArgumentNullExceptionname is null.
See Also