Static constructors are introduced with C# to initialize the static data of a class. CLR calls the static constructor before the first instance is created.
The static constructor has the following features:
No access specifier is required to define it.
You cannot pass parameters in static constructor.
A class can have only one static constructor.
It can access only static members of the class.
It is invoked only once, when the program execution begins.
Liked By
Write Answer
What is a static constructor?
Join MindStick Community
You have need login or register for voting of answers or question.
Sumit Kesarwani
04-Sep-2014Static constructors are introduced with C# to initialize the static data of a class. CLR calls the static constructor before the first instance is created.
The static constructor has the following features:
No access specifier is required to define it.
You cannot pass parameters in static constructor.
A class can have only one static constructor.
It can access only static members of the class.
It is invoked only once, when the program execution begins.