fork(3) download
  1. using System.IO;
  2. using System;
  3. using System.Collections.Generic;
  4.  
  5. class Program
  6. {
  7. static void Main()
  8. {
  9. MyClass one = new MyClass();
  10. MyClass two = new MyClass();
  11. MyClass three = new MyClass();
  12.  
  13. one.Load(10);
  14. two.Load(50);
  15. three.Load(100);
  16.  
  17. System.Console.WriteLine("One.Count " + one.Params.Count);
  18. System.Console.WriteLine("Two.Count " +two.Params.Count);
  19. System.Console.WriteLine("Three.Count "+ three.Params.Count);
  20. }
  21. }
  22.  
  23. public class MyClass
  24. {
  25. public List<int> Params = new List<int>();
  26.  
  27. public void Load(int data)
  28. {
  29. Params.Add(data);
  30. }
  31. }
  32.  
Success #stdin #stdout 0.03s 34808KB
stdin
Standard input is empty
stdout
One.Count  1
Two.Count 1
Three.Count  1