Select from following answers:- As many times as we call.
- As many times before object gets garbage collected.
- Only once.
- As many times before object gets deleted.
- All Above
Static constructors allow you to initialize static variables in a class, or do other things needed to do in a class after it's first referenced in your code. They are called only once each time your program runs.
Static constructors are declared with this syntax, and can't be overloaded or have any parameters because they run when your class is referenced by its name:
Show Correct Answer
Asked In: Many Interviews |
Alert Moderator