Why do we need constructor in c#?



Why do we need constructor in c#?..

Answer / Raja Singh

A constructor in C# is a special method that is used to initialize an object. It is automatically called when an object is created, allowing the programmer to set default values for member variables and perform other necessary operations before the object can be used.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What does assert() do?

2 Answers  


What is difference between array and list?

1 Answers  


What Is A Multicast Delegate?

1 Answers   Siebel Systems,


Can an abstract class inherit from another abstract class c#?

1 Answers  


What is difference between ilist and list?

1 Answers  


Define parsing?

1 Answers  


What are managed providers?

1 Answers   UGC Corporation,


What is the diff between System.String and System.Text.StringBuilder classes?

1 Answers   Siebel,


What is meant by clr?

1 Answers  


How do you create multiple inheritance in C#?

5 Answers   Infosys, KenIndia, Microsoft,


What does virtual keyword mean ?

6 Answers   TCS,


What is difference between int and int32 in c#?

1 Answers  


Categories