What do we mean by Constructor?

 Posted by vishalneeraj-24503 on 1/14/2014 | Category: C# Interview questions | Views: 1764 | Points: 40

Whenever we create object of a class,then constructor is called.
Constructor is a method in the class which has the same name as the class(in VB.Net it's New()).
It initializes the member attributes whenever an instance of the class is created.
It has no return type.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response