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
Why it's said that writing into .NET Application Configuration Files is a Bad Idea?
is it possible to access a remote web service Without UDDI?
What is the use of console readkey in c#?
What is monitor in C#?
What kind of the information stored inside the assembly?
How do we achieve encapsulation in c#?
What do you mean by casting a data type?
Explain manifest & metadata in c#.
How do you comment out code in c#?
What are controls in c#?
How to sign an assembly with strong name?
Do loops c#?
Explain the difference between const and static read-only?
Why delegates are required?
What is Web.config?