Answer Posted / shadab alam
static costructor of a class invoked automatically when
class is loded provided Main method is given.There is no
need to create instance of a class.
we can prove it by following program in c#
using System;
class aa
{
static aa()
{
Console.Write("without instance");
}
public static void Main()
{
}
}
output will be
---------------
without instance
Is This Answer Correct ? | 13 Yes | 0 No |
Post New Answer View All Answers
What is the use of thread join in c#?
What is a value type in c#?
Can property be private in c#?
What are jump statements in c#?
Can we inherit a private class in c#?
Is datetime immutable c#?
What do you mean by saying a "struct is a value type"?
Why do we need singleton pattern in c#?
What is the difference between int16 and int32 in c#?
what optimizations does the c# compiler perform when you use the /optimize+ compiler option?
How more than one version of an assembly can keep in same place?
What is the default value of datetime in c#?
What is the difference between package and interface?
Is linkedhashset synchronized?
What is the use of dll file in c#?