Can you have multiple constructors C#?

In C#, default constructor is nothing but a constructor which takes no parameter. So you cannot create a multiple constructor without any parameter which means you cannot have multiple default constructor, but you can have multiple constructor for a class .

Sizin İçin Seçtik  How do cross-platform apps work?

Leave a Reply

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

Can you have multiple constructors C#?

In C#, default constructor is nothing but a constructor which takes no parameter. So you cannot create a multiple constructor without any parameter which means you cannot have multiple default constructor, but you can have multiple constructor for a class .

Sizin İçin Seçtik  Can constructors accept parameters?

Leave a Reply

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