Describe the concept of constructor

Briefly describe the concept of constructor?

E

Expert

Verified

Constructor is a special method of a class that is called automatically during the instance of the class is created. Constructor is created with a same name as of a class and it initializes all the class members, at any time you access the class. The chief features of the constructor are as follows:
i. Constructors are always public

ii. It does not have any return type

It is not compulsory to declare the constructor; it is called up automatically by .NET Framework.

   Related Questions in Software Engineering

©TutorsGlobe All rights reserved 2022-2023.