Retrieves a MethodInfo object corresponding to a specified method under specified search constraints.
[Visual Basic] Overloads Function GetMethod( _ ByVal name As String, _ ByVal bindingAttr As BindingFlags _ ) As MethodInfo [C#] MethodInfo GetMethod( string name, BindingFlags bindingAttr ); [C++] MethodInfo* GetMethod( String* name, BindingFlags bindingAttr ) = 0; [JScript] function GetMethod( name : String, bindingAttr : BindingFlags ) : MethodInfo;
A MethodInfo object containing the method information, and the match is based upon the name of the method.
Exception Type | Condition |
---|---|
AmbiguousMatchException | If the object implements multiple methods with the same name. |
The GetMethod method retrieves a MethodInfo object that corresponds to a specified method that uses name and bind attributes parameters.
An example of a binding attribute value is IgnoreCase.
IReflect Interface | IReflect Members | System.Reflection Namespace | IReflect.GetMethod Overload List | String | BindingFlags