When compiler adds a default constructor to a class?
Answers were Sorted based on User's Feedback
Answer / chandana
The compiler adds a default constructor to a class when no
constructor are specified by the programmer.
Is This Answer Correct ? | 10 Yes | 0 No |
Answer / sitaram
when ever compile the class,First compiler check the any
type of constructor is available or not in that class? if
it is not available. compiler will automatically create the
default constructor.
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / abhay k pandey
When there in no explicite parameterless constructor
written for any class. C# compiler calls the default
constructor and initializes fields with zero, false and
null values.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / romeo
when the object of that class is created with no parameters
passed.
Is This Answer Correct ? | 2 Yes | 7 No |
Constructor to an arbitrary base constructor?
What is the difference between overriding and overloading in systemverilog?
What do you mean by winforms in c#?
Where test director stores its data ? Database ,Local file etc...? I need to read this data from Visual Studio 2005 c# client. Regards
Why do we need private constructor in c#?
What are three test cases you should go through in unit testing?
1 Answers Siebel Systems, Wipro,
What is a console?
How can I check the type of an object at runtime?
Consider the following pieces of C# code: a. interface I1 {/*......*/} interface I2 {/*......*/} struct Point : I1,I2 {/* ..... */} b. struct Book{ int bookId; struct Book b; } c. using M=Mystruct; struct MyStruct{ int id; } class MyClass{ static void Main(string[] args){ M m = new M(); } } d. struct Sample{ Sample ref x; } Which of the above are correct? Choose one of the options below. a, c and d are right a only right a and c are right d only wrong None of the listed options
Why multiple Inheritence is not used in C#?
What is the difference between and xml documentation tag?
What is a dynamic assembly?