Retrieves the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints for the type of the current instance.
Namespace: Microsoft.VisualStudio.Data.Framework
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
'宣言
Private Function GetMethod ( _
name As String, _
bindingAttr As BindingFlags, _
binder As Binder, _
types As Type(), _
modifiers As ParameterModifier() _
) As MethodInfo Implements IReflect.GetMethod
'使用
Dim instance As DataViewBrowseObject
Dim name As String
Dim bindingAttr As BindingFlags
Dim binder As Binder
Dim types As Type()
Dim modifiers As ParameterModifier()
Dim returnValue As MethodInfo
returnValue = CType(instance, IReflect).GetMethod(name, _
bindingAttr, binder, types, modifiers)
MethodInfo IReflect.GetMethod(
string name,
BindingFlags bindingAttr,
Binder binder,
Type[] types,
ParameterModifier[] modifiers
)
private:
virtual MethodInfo^ GetMethod(
String^ name,
BindingFlags bindingAttr,
Binder^ binder,
array<Type^>^ types,
array<ParameterModifier>^ modifiers
) sealed = IReflect::GetMethod
JScript does not support explicit interface implementations.
Parameters
name
Type: System.StringThe name of the method to get.
bindingAttr
Type: System.Reflection.BindingFlagsA bitmask made up of one or more BindingFlags that specify how the search is conducted, or zero to return an empty array.
binder
Type: System.Reflection.BinderA Binder object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection; or a null reference (Nothing in Visual Basic) to use the DefaultBinder.
types
Type: []An array of [T:System.][Type] objects representing the number, order, and type of the parameters for the method to get, or an empty array of Type objects (as provided by the EmptyTypes field) to get a method that takes no parameters.
modifiers
Type: []An array of ParameterModifier objects representing the attributes associated with the corresponding element in the types array. To be used only when calling through COM interop, and only parameters that are passed by reference are handled. The default binder does not process this parameter.
Return Value
Type: System.Reflection.MethodInfo
A MethodInfo object representing the method that matches the specified binding constraints for the type of the current instance, if found; otherwise, a null reference (Nothing in Visual Basic).
Implements
IReflect.GetMethod(String, BindingFlags, Binder, [], [])
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.