Constructors are generated to allow an object to be initialized in a number of different ways. All productions have a default constructor with no parameters. This creates an empty object that can be filled in at a later time. Constructors are also created that take a parameter of the base type value to allow direct population upon creation of an object. In our example code, two constructors were generated:
public EmployeeNumber () : base() { } public EmployeeNumber (int value_) : base (value_) { }
More complex constructed ASN.1 types such as a SEQUENCE would have a constructor that would have an argument for each defined element. A CHOICE on the other hand would have a unique constructor for each of the possible choice items. See the sections on specific ASN.1 types to find out exactly what constructors are generated for a given type.