What is the use of the static constructor? When static
constructor gets compiled?
Answer / jitendra
Static constructor is used to initzialise the static data
members when the class has been instantiated first time.
Static data members can certainly be initialized at the
time of their declaration but there are times when value of
one static member may depend upon the value of another
static member. In such cases we definitely need some
mechanism to handle conditional initialization of static
members. To handle such situation, C# provides static
constructor.
Is This Answer Correct ? | 20 Yes | 2 No |
What is the difference between firstordefault and first?
I need code to connect ohter systems in the LAN and i want to display my website image over there and i want explain as a admin through phone. So i need code to access other system using C-Sharp. Any one please help me.Please give me the code. Advace thanks.
What is a satellite assembly in c#?
What is escape character in c#?
What is int32 maxvalue?
What is dapper in c#?
what are the Disadvantages of vb
What does readonly mean in c#?
Can you declare the override method static while the original method is non-static?
What?s the .NET datatype that allows the retrieval of data by a unique key?
When compiler adds a default constructor to a class?
Can we extend static class in c#?