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
Explain About CLS?
What is the difference between static and private constructor?
How does the lifecycle of Windows services differ from Standard EXE?
Is inheritance possible in c sharp?
Why do we overload constructors?
What is executescalar in c#?
How do you pass reference parameters in c#?
Does c# support multiple class inheritance?
Explain the ways to deploy an assembly?
What is the difference between an application domain and a process?
How many variables do you need?
Explain About disco and uddi
Is array value type in c#?
What do you mean by delegates and explain different types of delegates?
What is difference between array and collection in c#?