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


Please Help Members By Posting Answers For Below Questions

What is helper method in c#?

668


What is parsing? How to parse a date time string?

739


explain the features of static/shared classes.

688


how to implement a web service in .net

691


Which is faster dictionary or list?

720


Does c# support try-catch-finally blocks?

651


Define method overloading in c#?

759


Explain how to implement an object pool in c#.net

707


What is _viewstart cshtml?

651


What is the difference between abstract and virtual?

659


Why delegate is used in c#?

660


What is marshalling and what are different kinds of marshalling?

693


Is lazy t thread safe?

739


Define multicast delegate? How it be used?

773


What is ildasm and obfuscator in net?

727