what is a static constructorstatic constructors


What is a static constructor?

Static constructors are introduced with C# to initialize the static data of a class. CLR calls the static constructor before the initial instance is formed.

The static constructor has the subsequent features:

    No access specifier is needed to define it.

    You cannot pass parameters in static constructor.

    A class can have only single static constructor.

    It can access only static members of the class.

    It is requested only once, when the program execution starts.

 

Request for Solution File

Ask an Expert for Answer!!
DOT NET Programming: what is a static constructorstatic constructors
Reference No:- TGS0311057

Expected delivery within 24 Hours