Answer: Static constructor will be fired first.
Ex:
class Test{
public Test(){
Console.WriteLine(" public Test()");
}
static Test(){
Console.WriteLine(" static Test()");
}
}
class Program{
static void Main(string[] args){
Test test = new Test();
Console.Read();
}
}
Output:
static Test()
public Test()
Found interesting? Add this to: