7. 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?
Answer Posted / nilesh chaudhari
Compiler will provide the default constructor when you not
writing any constructor then only. Otherwise if you writes
any parameterized constructor then you have to explicitly
mentioned default constructor because this condition
Compiler will not provide the default constructor.
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What are callback methods in c#?
What is Web.config?
Define Final Class in C#
Are value types sealed?
What floating point types is supported in C#?
What does this keyword mean in c#?
What is class and object c#?
What is boxing & unboxing?
What is the difference between read and readline in c#?
Which function is the entry point for a DLL in MS Windows 3.1?
Can constructor have return type c#?
What are bitwise logical operators?
For methods inside the interface why can’t you specify the accessibility modifier?
What is fcl in c#?
What are custom exceptions in C#?