TypeBuilder.DefineConstructorCore 方法

定义

在派生类中重写时,使用给定的属性、签名和自定义修饰符向类型添加新构造函数。

protected:
 abstract System::Reflection::Emit::ConstructorBuilder ^ DefineConstructorCore(System::Reflection::MethodAttributes attributes, System::Reflection::CallingConventions callingConvention, cli::array <Type ^> ^ parameterTypes, cli::array <cli::array <Type ^> ^> ^ requiredCustomModifiers, cli::array <cli::array <Type ^> ^> ^ optionalCustomModifiers);
protected abstract System.Reflection.Emit.ConstructorBuilder DefineConstructorCore (System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, Type[]? parameterTypes, Type[][]? requiredCustomModifiers, Type[][]? optionalCustomModifiers);
abstract member DefineConstructorCore : System.Reflection.MethodAttributes * System.Reflection.CallingConventions * Type[] * Type[][] * Type[][] -> System.Reflection.Emit.ConstructorBuilder
Protected MustOverride Function DefineConstructorCore (attributes As MethodAttributes, callingConvention As CallingConventions, parameterTypes As Type(), requiredCustomModifiers As Type()(), optionalCustomModifiers As Type()()) As ConstructorBuilder

参数

attributes
MethodAttributes

枚举值的按位组合,指定构造函数的属性。

callingConvention
CallingConventions

构造函数的调用约定。

parameterTypes
Type[]

构造函数的参数类型。

requiredCustomModifiers
Type[][]

由类型数组组成的数组。 每个类型的数组都表示相应参数所需的自定义修饰符。

optionalCustomModifiers
Type[][]

由类型数组组成的数组。 每个类型数组均表示相应参数的可选自定义修饰符。

返回

定义构造函数。

适用于