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
Which types of inheritances does c# support?
What is out int in c#?
explain the nature of the assembly work?
What is the process of Serialization?
Can hashtable have duplicate keys?
What is a byte in c#?
What is default method in c#?
What is the difference between overriding and overloading in systemverilog?
How is a string immutable?
what is the difference between .dll and .exe
Can I call a virtual method from a constructor/destructor?
Between windows authentication and sql server authentication, which one is trusted and which one is untrusted?
What is data binding c#?
Is lazy thread safe c#?
What is session management in c#?