System.Reflection.Emit.ConstructorBuilder Class

Defines and represents a constructor of a dynamic class.

See Also: ConstructorBuilder Members

Syntax

[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.ComDefaultInterface(typeof(System.Runtime.InteropServices._ConstructorBuilder))]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class ConstructorBuilder : System.Reflection.ConstructorInfo, System.Runtime.InteropServices._ConstructorBuilder

Remarks

System.Reflection.Emit.ConstructorBuilder is used to fully describe a constructor in Microsoft intermediate language (MSIL), including the name, attributes, signature, and constructor body. It is used in conjunction with the System.Reflection.Emit.TypeBuilder class to create classes at run time. Call TypeBuilder.DefineConstructor(System.Reflection.MethodAttributes, System.Reflection.CallingConventions, Type[]) to get an instance of System.Reflection.Emit.ConstructorBuilder.

If you do not define a constructor for your dynamic type, a default constructor is provided automatically, and it calls the default constructor of the base class.

If you use System.Reflection.Emit.ConstructorBuilder to define a constructor for your dynamic type, a default constructor is not provided. You have the following options for providing a default constructor in addition to the constructor you defined:

Requirements

Namespace: System.Reflection.Emit
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0