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 is concatenation and when should it be used?
What is difference between comparable and comparator?
What are the return types in c#?
What are c# attributes and its significance?
Explain the Usage of web.config
Can you change the value of a constant filed after its declaration?
Can you access a hidden base class method in the derived class?
What does assert() do in c#?
What is poco c#?
Is ram a heap?
How many bytes is a long c#?
What is short in c#?
Is there hashmap in c#?
Is arraylist type safe in c#?
What is hashmap in c#?