Hi....
Ques : C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jan 17, 2012, 5:52 PM
If you create a constructor which takes a parameter, then the system no longer provides a default parameterless one. If you still want a parameterless constructor, you therefore have to provide it yourself.