fork download
  1. using System;
  2.  
  3. class A {
  4. public A() { Console.WriteLine("A"); }
  5. }
  6.  
  7. class B {
  8. public B() { Console.WriteLine("B"); }
  9. }
  10.  
  11. public class Test
  12. {
  13. static readonly A a;
  14. static readonly B b;
  15.  
  16. public static void Main()
  17. {
  18. }
  19.  
  20. static Test()
  21. {
  22. b = new B();
  23. Console.WriteLine("-");
  24. a = new A();
  25. }
  26.  
  27. }
Success #stdin #stdout 0.01s 29664KB
stdin
Standard input is empty
stdout
B
-
A