Wednesday, 6 April 2016

Explain the concept of constructor

Constructor is a special method of a class, which is called automatically when the instance of a class is created. It is created with the same name as the class and initializes all class members, whenever you access the class. The main features of a constructor are as follows:


  • Constructors do not have any return type
  • Constructors are always public
  • It is not mandatory to declare a constructor; it is invoked automatically by .NET Framework.

No comments:

Post a Comment

Featured post

What is SharePoint?

Microsoft SharePoint is an extensible platform that provides a range of products that can help organizations with solution for a variety...