I thought IEnumerable things are objects over which you can iterate.
If they are also ICollections you know how much elements are in there.
And if they are even ILists you can take containing objects from a specific index.
A ReadOnlyCollection<T> implements IList<T>. So wouldnt ReadOnlyList<T> be a better name.
And is there a real ReadOnlyCollection<T> in the framework?
(So I dont need an IList to create such a read only wrapper)
1 Answer