/mcs/tests/gtest-287.cs

https://bitbucket.org/danipen/mono · C# · 22 lines · 16 code · 6 blank · 0 comment · 0 complexity · 5cc35149de088c9f2553ebe4a337d2b7 MD5 · raw file

  1. using System;
  2. using System.Collections.Generic;
  3. interface I {
  4. void D ();
  5. }
  6. class X : I
  7. {
  8. public static void Main ()
  9. {
  10. List<object> l = new List<object> ();
  11. List<I> i = new List<I> ();
  12. i.Add (new X());
  13. l.AddRange (i.ToArray());
  14. }
  15. public void D () {}
  16. }