c# If the default constructor of a struct can't be overridden, why define a non-default constructor?

Here is the excerpt from the code, it may help clarify my question a bit.

struct Date
    {
    private int year;
    private Month month;
    private int day;
    }

Chapter 9 Creating Value Types with Enumerations and Structures 225 Consider the default constructor that the compiler will generate for Date. This constructor sets the year to 0, the month to 0 (the value of January), and the day to 0. The year value 0 is not valid (because there was no year 0), and the day value 0 is also not valid (because each month starts on day 1). One way to fix this problem is to translate the year and day values by implementing the Date structure so that when the year field holds the value Y, this value represents the year Y + 1900 (or you can pick a different century if you prefer), and when the day field holds the value D, this value represents the day D + 1. The default constructor will then set the three fields to values that represent the date 1 January 1900. If you could override the default constructor and write your own, this would not be an issue, as you could then initialize the year and day fields directly to valid values. You cannot do this, though, and so you have to implement the logic in your structure to translate the compiler-generated default values into meaningful values for your problem domain. However, although you cannot override the default constructor, it is still good practice to define nondefault constructors to allow a user to explicitly initialize the fields in a structure to meaningful nondefault values. 3. Add a public constructor to the Date structure. This constructor should take three parameters: an int named ccyy for the year, a Month named mm for the month, and an int named dd for the day. Use these three parameters to initialize the corresponding fields. A year field with the value Y represents the year Y + 1900, so you need to initialize the year field to the value ccyy – 1900. A day field with the value D represents the day D + 1, so you need to initialize the day field to the value dd – 1.

/r/learnprogramming Thread