When compiler adds a default constructor to a class?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the working of serialization?

492


What is a console?

500


Is for loop faster than foreach?

533


What is the difference between internal and protected in c#?

439


If you define a user defined data type by using the struct keyword, is it a value type or reference type?

520






Why is c# a good programming language?

476


What are accessors?

536


Hi to all..I have to create an intranet application on C#.NET windows Application so please please let can you people help me as iam new in .NET and if u have any samples or website address from where i can get sample please let know.

3804


What are the different types of classes?

480


Why do we use threads in c#?

521


What is the purpose of the integer parse method the decimal parse method?

526


What is windows forms in c#?

472


What are the 4 pillars of any object oriented programming language?

454


Why do we Need of static class in c#?

648


Why we use get set in c#?

504