fork download
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4.  
  5. class Ideone
  6. {
  7. static List<int> l = new List<int> {1,2,3};
  8.  
  9. static IEnumerable<int> Get() { return l; }
  10.  
  11. public static void Main(string[] args)
  12. {
  13. var list = Get() as List<int>;
  14. list.Add(4);
  15. Console.WriteLine(l.Count());
  16. }
  17. }
Success #stdin #stdout 0.04s 34800KB
stdin
Standard input is empty
stdout
4