What are Constructors ?

 Posted by Puneet20884 on 12/23/2009 | Category: OOPS Interview questions | Views: 4079

Constructors are used for initializing the members of a class whenever an object is created with the default values for initialization.

If no constructor defined then the CLR will provide an implicit constructor which is called as Default Constructor.

A class can have any number of constructors provided they vary with the number of arguments that are passed, which is they should have different signatures.

Constructors do not return a value
Constructors can be overloaded

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response