When compiler adds a default constructor to a class?

Answers were Sorted based on User's Feedback



When compiler adds a default constructor to a class?..

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

When compiler adds a default constructor to a class?..

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

When compiler adds a default constructor to a class?..

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

When compiler adds a default constructor to a class?..

Answer / romeo

when the object of that class is created with no parameters
passed.

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More C Sharp Interview Questions

Advantages of c# over vb.net?

3 Answers   HCL, Syntel,


What is the difference between int.Parse() and Convert.toInt32().

2 Answers  


What is the difference between wrapper class and primitive?

0 Answers  


Is array reference type in c#?

0 Answers  


What happens if you add duplicate elements to a set?

0 Answers  






How can we acheive inheritance in VB.NET ?

2 Answers   TCS,


Explain when should you call the garbage collector in .net?

0 Answers  


What is hiding in CSharp ?

1 Answers  


What is strong name in c# and how can we use it?

0 Answers   DELL,


How do you type a null character?

0 Answers  


what is the difference between .dll and .exe

0 Answers   HCL,


Explain the difference between private and shared assembly?

0 Answers  


Categories