fork download
  1. using System;
  2. using System.Collections.Generic;
  3. public class Test
  4. {
  5.  
  6. interface IFoo {
  7. int A {get;set;}
  8. }
  9. class Foo : IFoo {
  10. public int A {get;set;}
  11. }
  12. public static void Main()
  13. {
  14. IList<IFoo> aaa = new List<Foo>();
  15. }
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(14,13): error CS0266: Cannot implicitly convert type `System.Collections.Generic.List<Test.Foo>' to `System.Collections.Generic.IList<Test.IFoo>'. An explicit conversion exists (are you missing a cast?)
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty