What is a Constructor?

 Posted by Bharathi Cherukuri on 2/22/2012 | Category: C# Interview questions | Views: 2105 | Points: 40

A constructor is a special method for initializing a new instance of a class.
The constructor method for a class will have the same name as that of a class.
A class may have multiple constructors in which, each constructor will have the same name, but will have different arguments.
There is no need of calling a constructor, It will evoke automatically when an Object of the class is created.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response