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's the difference between a method and a procedure?
Can you inherit from multiple classes in c#?
can you allow a class to be inherited, but prevent the method from being over-ridden?
Is c# an open source language?
Define thread?
What is console programming language?
Explain async and await?
What is the base class in .net from which all the classes are derived from?
What are the differences between system.string and system.text.stringbuilder classes?
What are the types in c#?
What is deadly diamond problem?
Does a loop recorder have to be removed?
What is the difference between finalize() and dispose()?
What is disconnected data architecture in c#?
What is a constructor in c#?