How is Generic Covariance & Contra-variance Implemented in C# 4.0?
Variance will only be supported in a safe way – in fact, using the abilities that the CLR already has. So the examples I give in the book of trying to use a List<Banana> as a List<Fruit> (or whatever it was) still won’t work – but a few other scenarios will. Firstly, it will only … Read more