fork download
  1. using System;
  2.  
  3. public class C
  4. {
  5.  
  6. public C(){}
  7. ~C(){}
  8. public void getData(){}
  9.  
  10. }
  11.  
  12. public class B
  13. {
  14. private bool _flag;
  15. private C _c;
  16. public B(C c)
  17. {
  18. _flag=true;
  19. _c=c;
  20. (new System.Threading.Thread(delegate() {
  21. run();
  22. })).Start();
  23. }
  24. ~B(){_flag=false;}
  25. public void run(){ while (_flag){_c.getData();};}
  26. }
  27.  
  28. public class A: C
  29. {
  30. B _b;
  31. public A(){_b=new B(this); }
  32. ~A(){}
  33. }
  34.  
  35. public class Test
  36. {
  37. public static void Main()
  38. {
  39. {
  40. A a=new A();
  41. }
  42. Console.Write("hello");
  43. // your code goes here
  44. }
  45. }
Time limit exceeded #stdin #stdout 5s 37408KB
stdin
Standard input is empty
stdout
hello