AccessibleObject.IReflect.GetMethod Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
IReflect.GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]) |
Gets a MethodInfo object corresponding to a specified method, using a Type array to choose from among overloaded methods. For a description of this member, see GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]). |
IReflect.GetMethod(String, BindingFlags) |
Gets a MethodInfo object corresponding to a specified method under specified search constraints. For a description of this member, see GetMethod(String, BindingFlags). |
IReflect.GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[])
Gets a MethodInfo object corresponding to a specified method, using a Type array to choose from among overloaded methods. For a description of this member, see GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]).
virtual System::Reflection::MethodInfo ^ System.Reflection.IReflect.GetMethod(System::String ^ name, System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers) = System::Reflection::IReflect::GetMethod;
System.Reflection.MethodInfo IReflect.GetMethod (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, Type[] types, System.Reflection.ParameterModifier[] modifiers);
System.Reflection.MethodInfo? IReflect.GetMethod (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, Type[] types, System.Reflection.ParameterModifier[]? modifiers);
abstract member System.Reflection.IReflect.GetMethod : string * System.Reflection.BindingFlags * System.Reflection.Binder * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.MethodInfo
override this.System.Reflection.IReflect.GetMethod : string * System.Reflection.BindingFlags * System.Reflection.Binder * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.MethodInfo
Function GetMethod (name As String, bindingAttr As BindingFlags, binder As Binder, types As Type(), modifiers As ParameterModifier()) As MethodInfo Implements IReflect.GetMethod
Parameters
- name
- String
The name of the member to find.
- bindingAttr
- BindingFlags
The binding attributes used to control the search.
- types
- Type[]
An array used to choose among overloaded methods.
- modifiers
- ParameterModifier[]
An array of parameter modifiers used to make binding work with parameter signatures in which the types have been modified.
Returns
The requested method that matches all the specified parameters.
Implements
Exceptions
The object implements multiple methods with the same name.
Remarks
The return value is a match based on the method name, the System.Reflection.BindingFlags enumeration, the kind of type conversion specified by the binder
parameter, the overload, and the System.Reflection.ParameterInfo that describes the signature of the method.
This member is an explicit interface member implementation. It can be used only when the AccessibleObject instance is cast to an IReflect interface.
Applies to
IReflect.GetMethod(String, BindingFlags)
Gets a MethodInfo object corresponding to a specified method under specified search constraints. For a description of this member, see GetMethod(String, BindingFlags).
virtual System::Reflection::MethodInfo ^ System.Reflection.IReflect.GetMethod(System::String ^ name, System::Reflection::BindingFlags bindingAttr) = System::Reflection::IReflect::GetMethod;
System.Reflection.MethodInfo IReflect.GetMethod (string name, System.Reflection.BindingFlags bindingAttr);
System.Reflection.MethodInfo? IReflect.GetMethod (string name, System.Reflection.BindingFlags bindingAttr);
abstract member System.Reflection.IReflect.GetMethod : string * System.Reflection.BindingFlags -> System.Reflection.MethodInfo
override this.System.Reflection.IReflect.GetMethod : string * System.Reflection.BindingFlags -> System.Reflection.MethodInfo
Function GetMethod (name As String, bindingAttr As BindingFlags) As MethodInfo Implements IReflect.GetMethod
Parameters
- name
- String
The name of the member to find.
- bindingAttr
- BindingFlags
The binding attributes used to control the search.
Returns
A MethodInfo object containing the method information, with the match being based on the method name and search constraints specified in bindingAttr
.
Implements
Exceptions
The object implements multiple methods with the same name.
Remarks
This member is an explicit interface member implementation. It can be used only when the AccessibleObject instance is cast to an IReflect interface.