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
Can a class have more than 1 destructor?
Is it not possible to store a boolean value as a variable?
What is public or shared assemblies ?
How can we sort an array in c#?
What is anonymous class in c#?
What is ienumerable t in c#?
How to put assembly in gac?
Why do we need reflection in c#?
How to find whether the application is run from inside ide or not?
What is strongly typed view?
Is array immutable in c#?
What do u mean by thread safe?
Difference between call by value and call by reference in C#?
What is uint64?
What can I create with c#?