What is the purpose of default constructor in C#?

A constructor with no parameters is called a default constructor. A default constructor has every instance of the class to be initialized to the same values. The default constructor initializes all numeric fields to zero and all string and object fields to null inside a class .

Sizin İçin Seçtik  Why do we need no arg constructor?

Leave a Reply

Your email address will not be published. Required fields are marked *