Rachna Singh
Can we have static constructors, If yes then why we use static constructors?
By Rachna Singh in .NET on Sep 05 2015
  • Nilesh Srivastav
    Sep, 2016 29

    No we cannot use constructers in static block

    • 0
  • Ranjit Powar
    Jan, 2016 1

    Yes there is concept of static constructor. A static constructor is use to initialize static data or to perform a particular action that need to be performed only once in life cycle of class. Static constructor is first block of code to execute in class. Static constructor executes one and only one time in life cycle of class. It is called automatically. Static constructor does not take any parameters. It has no access specifiers. It is not called directly

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS