I\'ve got an IList that I want to cast to ICollection but when I attempt an explicit cast, I get null
IList
ICollection
null
You can cast each element into new iterator:
var collectionOfBase = (collectionOfDerived as IEnumerable).Cast();