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
If .NET 3.5 is an option, you can use the Cast extension method in System.Core.dll to get a read-only IEnumerable for the collection:
Cast
System.Core.dll
IEnumerable
using System.Linq; ... private void Refresh() { PopulateList( cachedCollection.Cast( ) ); }