TypeDelegator.GetMethodImpl 方法

定义

用指定的绑定约束和指定的调用约定,搜索参数与指定的参数类型及修饰符相匹配的指定方法。

protected:
 override System::Reflection::MethodInfo ^ GetMethodImpl(System::String ^ name, System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, System::Reflection::CallingConventions callConvention, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
protected override System.Reflection.MethodInfo? GetMethodImpl (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, System.Reflection.CallingConventions callConvention, Type[]? types, System.Reflection.ParameterModifier[]? modifiers);
protected override System.Reflection.MethodInfo GetMethodImpl (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, Type[] types, System.Reflection.ParameterModifier[] modifiers);
override this.GetMethodImpl : string * System.Reflection.BindingFlags * System.Reflection.Binder * System.Reflection.CallingConventions * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.MethodInfo
Protected Overrides Function GetMethodImpl (name As String, bindingAttr As BindingFlags, binder As Binder, callConvention As CallingConventions, types As Type(), modifiers As ParameterModifier()) As MethodInfo

参数

name
String

方法名称。

bindingAttr
BindingFlags

影响执行搜索的方式的位掩码。 该值是零个或多个来自 BindingFlags 的位标志的组合。

binder
Binder

一个对象,它使用反射启用绑定、参数类型的强制、成员的调用和 MemberInfo 对象的检索。 如果 bindernull,则使用默认联编程序。

callConvention
CallingConventions

调用约定。

types
Type[]

Type 类型的数组,包含参数数量、顺序和类型的列表。 类型不能为 null;使用相应的 GetMethod 方法或空数组搜索不带参数的方法。

modifiers
ParameterModifier[]

ParameterModifier 类型的数组,它与 types 数组的长度相同,后者的元素表示与要获取的方法的参数关联的属性。

返回

MethodInfo

匹配指定条件的实现方法的 MethodInfoInfo 对象;如果无法找到匹配项,则为 null

注解

此参数 callConvention 指示入口点的调用约定。 CallingConventions如果未指定,则使用默认值CallingConventions``Standard

适用于

另请参阅