Samir Bhogayta
What is the difference between a static and an instance constructor?
By Samir Bhogayta in C# on Jun 25 2016
  • kajal rane
    Apr, 2019 7

    1)static constructor is invoked before any instance of that class is created. instance constructor is invoked when class instance is created. 2)static constructor don't have any any access modifiers. instance constructor have access modifiers. 3)static constructor is cannot be parameterised. instance constructor can be.4)static constructor will invoked only once . instance constructor will invoked as time instance of class created.

    • 1
  • Samir Bhogayta
    Jun, 2016 25

    An instance constructor implements code to initialize the instance of the class. A static constructor implements code to initialize the class itself when it is first loaded.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS