TypeBuilder.GetConstructorImpl 方法

定义

在派生类中重写时,使用指定的绑定约束和指定的调用约定搜索其参数与指定参数类型和修饰符匹配的构造函数。

protected:
 override System::Reflection::ConstructorInfo ^ GetConstructorImpl(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.ConstructorInfo? GetConstructorImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, System.Reflection.CallingConventions callConvention, Type[] types, System.Reflection.ParameterModifier[]? modifiers);
protected override System.Reflection.ConstructorInfo GetConstructorImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, Type[] types, System.Reflection.ParameterModifier[] modifiers);
override this.GetConstructorImpl : System.Reflection.BindingFlags * System.Reflection.Binder * System.Reflection.CallingConventions * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.ConstructorInfo
Protected Overrides Function GetConstructorImpl (bindingAttr As BindingFlags, binder As Binder, callConvention As CallingConventions, types As Type(), modifiers As ParameterModifier()) As ConstructorInfo

参数

bindingAttr
BindingFlags

枚举值的按位组合,用于指定如何执行搜索。

-或-

Default 返回 null

binder
Binder

一个对象,定义一组属性并启用绑定,这可能涉及选择重载的方法、强制参数类型以及通过反射调用成员。

-或-

使用 DefaultBindernull 引用(在 Visual Basic 中Nothing)。

callConvention
CallingConventions

指定用于参数顺序和布局的规则集、传递返回值的方式、用于参数的寄存器以及清理堆栈的对象。

types
Type[]

表示要获取的构造函数的参数的数量、顺序和类型的 Type 对象的数组。

-或-

类型为空数组 Type(即 Type[] types = new Type[0]),以获取不带参数的构造函数。

modifiers
ParameterModifier[]

表示与 types 数组中相应元素关联的属性的 ParameterModifier 对象的数组。 默认绑定器不处理此参数。

返回

一个 ConstructorInfo 对象,表示满足指定要求的构造函数(如果找到);否则,null

适用于