fork(1) download
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. class A {}
  5. class B : A {}
  6.  
  7. public class Test
  8. {
  9. static void AddEntries(List<A> list)
  10. {
  11. list.Add(new B());
  12. }
  13.  
  14. public static void Main()
  15. {
  16. var list = new List<A>();
  17.  
  18. AddEntries(list);
  19.  
  20. Console.WriteLine("List length: " + list.Count);
  21. }
  22. }
Success #stdin #stdout 0.01s 131136KB
stdin
Standard input is empty
stdout
List length: 1