Any chance of an IReadOnlyList collection interface? [Kit George]

Joe White asked for this specific feature:

For the most part, I like the way you designed collections in .NET -- especially interfaces like IEnumerable, ICollection, and IList. The problem is, you jump straight from a read-only, non-random-access collection (ICollection) to a read/write, random-access collection (IList). Very often, it would be useful to have something in between -- a read-only, but still random-access, list, with a read-only indexer but without some of the methods like Add, Clear, Remove, etc. Ideally IReadOnlyList would descend from ICollection, and IList would then descend from IReadOnlyList. Any chance something like this could make it into a future version of the Framework?

Because we could provide a default implementation for what you're talking about Joe, rather than giving you an interface, we provided ReadOnlyCollectionBase. However, given that it wasn't strongly typed, I can understand a reluctance to use it. But with the introduction of generics, we now also have ReadOnlyCollection<T>, so you get the same functionality, but strongly-typed: awesome!

ReadOnlyCollection<T> isn't sealed, so feel free to write your own collection on top if needed. We have no plans to introduce an interface for this same concept, since the collections we've made for this suit the general need.