Guest User

Untitled

a guest
Nov 15th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. public static class Foo
  2. {
  3. static Foo() { MainClass.Value = "Something"; }
  4. public static void DoSomething() { Thread.Sleep(100); }
  5. }
  6.  
  7. public static class MainClass
  8. {
  9. public static string Value = "Nothing";
  10.  
  11. public static void Main()
  12. {
  13. Console.WriteLine(Value);
  14. Foo.DoSomething();
  15. Console.WriteLine(Value);
  16. }
  17. }
  18.  
  19. Nothing
  20. Something
Add Comment
Please, Sign In to add comment