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
Can you create partial delegates and enumerations?
What is gridview c#?
Are c# destructors the same as c++ destructors?
if a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constructor?
Explain constructor in c#?
Is c++ or c# better?
What is private void in c#?
List some of the basic string operation?
What is iqueryable in linq?
what is the syntax to inherit from a class in c#?
What is use of hashtable in c#?
Explain the difference between a sub and a function in c#.
Is c# easier than javascript?
What do u meant by "SBI" of an object?
What is interpolation in programming?