I wonder why IEnumerable
can\'t be assigned to a IEnumerable
. After all IEnumerable
is one of the few interfa
The simplistic answer is that this is just one of the quirks in the way that variance is implemented in C# and the CLR.
From "Covariance and Contravariance in Generics":
Variance applies only to reference types; if you specify a value type for a variant type parameter, that type parameter is invariant for the resulting constructed type.