fork download
  1. using System;
  2. using System.Threading.Tasks;
  3.  
  4. public class Test
  5. {
  6. private static string str = "Hello";
  7.  
  8. public static void Main()
  9. {
  10. Task t = new Task(() => Console.WriteLine(str));
  11. str = "changed";
  12. t.Start();
  13. t.Wait();
  14. }
  15. }
Success #stdin #stdout 0.05s 27352KB
stdin
Standard input is empty
stdout
changed