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 type cast in C#?
0 Answers TryTechnicals Pvt Ltd,
How do you generate documentation from the C# file commented properly with a command-line compiler?
Illustrate the differences between the system.array.copyto() and system.array.clone()?
Define delegate in c#?
What is dao in c#?
What is the difference between yield and return?
Which are access modifiers available in c#?
What is monitor in C#?
0 Answers TryTechnicals Pvt Ltd,
What is the use of jit ? Jit (just - in - time) is a compiler which converts msil code to
What is c# and why it is used for?
can you declare an override method to be static if the original method is not static?
How is the syntax written to inherit from a class in C#?Give an example ?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)