Module.GetMethodImpl 方法

返回符合指定条件的方法实现。

**命名空间:**System.Reflection
**程序集:**mscorlib(在 mscorlib.dll 中)

语法

声明
Protected Overridable Function GetMethodImpl ( _
    name As String, _
    bindingAttr As BindingFlags, _
    binder As Binder, _
    callConvention As CallingConventions, _
    types As Type(), _
    modifiers As ParameterModifier() _
) As MethodInfo
用法
Dim name As String
Dim bindingAttr As BindingFlags
Dim binder As Binder
Dim callConvention As CallingConventions
Dim types As Type()
Dim modifiers As ParameterModifier()
Dim returnValue As MethodInfo

returnValue = Me.GetMethodImpl(name, bindingAttr, binder, callConvention, types, modifiers)
protected virtual MethodInfo GetMethodImpl (
    string name,
    BindingFlags bindingAttr,
    Binder binder,
    CallingConventions callConvention,
    Type[] types,
    ParameterModifier[] modifiers
)
protected:
virtual MethodInfo^ GetMethodImpl (
    String^ name, 
    BindingFlags bindingAttr, 
    Binder^ binder, 
    CallingConventions callConvention, 
    array<Type^>^ types, 
    array<ParameterModifier>^ modifiers
)
protected MethodInfo GetMethodImpl (
    String name, 
    BindingFlags bindingAttr, 
    Binder binder, 
    CallingConventions callConvention, 
    Type[] types, 
    ParameterModifier[] modifiers
)
protected function GetMethodImpl (
    name : String, 
    bindingAttr : BindingFlags, 
    binder : Binder, 
    callConvention : CallingConventions, 
    types : Type[], 
    modifiers : ParameterModifier[]
) : MethodInfo

参数

  • name
    方法名。
  • bindingAttr
    用于控制搜索的 BindingFlags 位标志之一。
  • binder
    实现 Binder 的对象,它包含与此方法相关的属性。
  • callConvention
    该方法的调用约定。
  • types
    要搜索的参数类型。
  • modifiers
    参数修饰符数组,用来与参数签名进行绑定,这些参数签名中的类型已经被修改。

返回值

包含指定的实现信息的 MethodInfo 对象;或者如果该方法不存在,则为 空引用(在 Visual Basic 中为 Nothing)。

异常

异常类型 条件

AmbiguousMatchException

types 为 空引用(在 Visual Basic 中为 Nothing)。

平台

Windows 98、Windows 2000 SP4、Windows Millennium Edition、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

Module 类
Module 成员
System.Reflection 命名空间
BindingFlags 枚举
CallingConventions 枚举
ParameterModifier