Default Constructor in C# | OOP in C# Part-11


Default Constructor

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.

إرسال تعليق

أحدث أقدم