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?
Answers were Sorted based on User's Feedback
Answer / guest
Two. Once you write at least one constructor, C# cancels
the freebie constructor, and now you have to write one
yourself, even if there?s no implementation in it
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / 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 |
What the different phase/steps of acquiring a proxy object in webservice?
What is the difference between “finalize” and “finally” methods in c#?
How do I get deterministic finalization in c#?
Is c sharp open source?
Where do I put dll files?
Can you pass value types by reference to a method?
What is single dimensional array in c#?
Can list contain duplicates c#?
What is the difference between system.text.stringbuilder and system.string?
what are pointer types in c#
What is assembly manifest?
What is the use of regex in c#?