.NET 4 introduces covariance. I guess it is useful. After all, MS went through all the trouble of adding it to the C# language. But, why is Covariance more useful than go
Covariance is cooler than polymorphism in the same way that jackrabbits are cooler than iceskates: they're not the same thing.
Covariance and contravariance (and invariance and...omnivariance...anybody?) deal with the "direction" that generics can go with regard to inheritance. In your example, you're doing the same thing, but that's not a meaningful example.
Consider, for example, the fact that IEnumerable is out T. This lets us do something like this:
public void PrintToString(IEnumerable
In previous versions of C#, this would have been impossible, as List implements IEnumerable and IEnumerable, not IEnumerable. However, since IEnumerable is out T, we know that it's now compatible for assignment or parameter passing for any IEnumerable where T is Y or T:Y.
This sort of thing could be worked around in previous versions under some circumstances by making the function itself generic and using generic type inference, yielding identical syntax in many cases. This, however, did not solve the larger problem and was by no means a 100% workaround.