Is it mandatory to use constructor?

So it is not mandatory to use a constructor , but if you don’t define one there is a “default constructor that will be created for you. Constructors are functions that initialize the object you have just instantiated which are called automatically when you instantiate an object to use in your program.

Read more

How do constructors work in C#?

In c#, Constructor is a method that will invoke automatically whenever an instance of class or struct is created . The constructor will have the same name as the class or struct, and it is useful to initialize and set default values for the data members of the new object.

Read more