[Mono-list] Crazy generic dictionary?

Andrus kobruleht2 at hot.ee
Mon Oct 1 05:05:50 EDT 2007

>FooDictionary<mytype> foo = new FooDictionary<mytype>();
>foo.Add(new List<subtypeA>());

>Error 11 Argument '1': cannot convert from 
>'System.Collections.Generic.List<subtypeA>' to 

>However, it should allow it because subtypeA inherits from mytype, 
>right? I think I've reached a limitation of .NET generics, which I think 

See also



More information about the Mono-list mailing list