fork download
  1. using System;
  2. using System.Collections.Generic;
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. var list = new List<int>(){1,2,3};
  8. foreach(var i in list)
  9. Console.WriteLine(i);
  10. list.Add(4);
  11.  
  12. list.AddRange(new int[2]{9,8});
  13.  
  14. list.Clear();
  15. Console.WriteLine(list.Count);
  16.  
  17. }
  18. }
Success #stdin #stdout 0.02s 15068KB
stdin
Standard input is empty
stdout
1
2
3
0