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
Are tuples mutable c#?
Is c# queue thread safe?
What is difference between managed and unmanaged code?
Can hashtable have duplicate keys in c#?
What is string method in c#?
What is garbage collection? How to force garbage collector to run?
Define c# i/o classes?
What exactly happens when we debug and build the program?
What are object pooling and connection pooling and difference? Where do we set the Min and Max Pool size for connection pooling?
Which of the following API is used to hide a window?
What is readline library?
What does return do in for loop?
Could you explain the difference between func vs action vs predicate?
what is partial assembly reference
What are the return types in c#?