Multiple choice technology programming languages

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?

  1. One

  2. Two

  3. Nill

  4. None

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Once you define any constructor in C#, the compiler no longer provides the default parameterless constructor. To keep a parameterless constructor along with your parameterized one, you must explicitly write both constructors.