Is there an interface like ICollection<t>, but designed for sorted collections?

I'd say the ICollection<T> Interface is suitable for implementation by sorted collection types, because a sorted collection can be enumerated, added to, removed from, cleared and checked for its contents.

As a counter-example, the IList<T> Interface is probably not suitable, because unlike ICollection<T> it assumes that the collection is a list where the elements can be added at specific positions, which doesn't make sense if the collection itself determines the position of each element.

The sorted collection types in the .NET Framework (the SortedList<TKey, TValue> Class, SortedDictionary<TKey, TValue> Class, and SortedSet<T> Class) all implement ICollection<T> but not IList<T>.

Tags:

C#

.Net

Interface