Saturday, April 14, 2012

more of IEnumerable vs. List

IEnumerable<T> and Array allow for covariance where List<T> does not. A collection of children may be cast to a collection of parents. This is one example of a way of in which IEnumerable<T> is more robust than List<T> in conflict with what I wrote here.

No comments:

Post a Comment