Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » CLR » Languages   (RSS)
Sorry, but there are no more tags available to filter with.

More on generic variance

In my entry on generic variance in the CLR , I said that you can’t convert a List<String> to a List<Object>, or even an IEnumerable<String> to IEnumerable<Object>. I should point out however that the real-world scenarios where
Posted by rmbyers | 20 Comments
Filed under: ,

Generic type parameter variance in the CLR

When people start using C# generics for the first time, they are sometimes surprised that they can’t convert between related generic instances. For example, since you can convert a string to an object , shouldn’t you also be able to convert a List <string>
Posted by rmbyers | 19 Comments
Filed under: ,
 
Page view tracker