fork download
  1. using System;
  2.  
  3. class Program {
  4. static void Main() {
  5. (Action c1, Action c2) = Test();
  6. c1();
  7. c1();
  8. c2();
  9. c2();
  10. }
  11. static (Action, Action) Test() {
  12. int c1 = 0;
  13. int c2 = 0;
  14. return (() => Console.WriteLine(c1++), () => Console.WriteLine(c2++));
  15. }
  16. }
  17.  
  18. //https://pt.stackoverflow.com/q/580366/101
Success #stdin #stdout 0.05s 24788KB
stdin
Standard input is empty
stdout
0
1
0
1