Sascha Leib wrote: > Hello all, > > I noticed one behaviour when using Generics: > > List<String> StringList = new List<String>(); > > List<Object> ObjectList = (StringList as List<Object>); // > Error > > The error message is: > Program.cs(14,51): error CS0039: Cannot convert type > `System.Collections.Generic.List<string>' to > `System.Collections.Generic.List<object>' via a built-in conversion > > Is that a wanted behaviour? Or am I missing something? This really stops > me from using more Generics at the moment :-/
An explication: http://jopinblog.wordpress.com/2007/10/26/c-generic-covariance/ Robert _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
