Adds a new constructor to the class, with the given attributes and signature.
[Visual Basic] Public Function DefineConstructor( _ ByVal attributes As MethodAttributes, _ ByVal callingConvention As CallingConventions, _ ByVal parameterTypes() As Type _ ) As ConstructorBuilder [C#] public ConstructorBuilder DefineConstructor( MethodAttributes attributes, CallingConventions callingConvention, Type[] parameterTypes ); [C++] public: ConstructorBuilder* DefineConstructor( MethodAttributes attributes, CallingConventions callingConvention, Type* parameterTypes[] ); [JScript] public function DefineConstructor( attributes : MethodAttributes, callingConvention : CallingConventions, parameterTypes : Type[] ) : ConstructorBuilder;
The defined constructor.
Exception Type | Condition |
---|---|
InvalidOperationException | if the type was previously created using CreateType |
TypeBuilder Class | TypeBuilder Members | System.Reflection.Emit Namespace