Should you define more than one constructor in C#?

A class can have multiple constructors, as long as their signature (the parameters they take) are not the same. You can define as many constructors as you need . When a Java class contains multiple constructors, we say that the constructor is overloaded (comes in multiple versions).

Sizin İçin Seçtik  What is the use of constructor with example?

Leave a Reply

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