System.Collections.Generic.SortedList is just a dictionary that sorts by key. If the key is temporarily somehow, you can simply use RemoveAt to remove the first element when you reach a certain size, when you want to add another record.
Probably since you mentioned Dictionary , you probably don't have a temporary key. But, a Dictionary is just a collection of KeyValuePair<K,V> objects. Thus, you can have a sorted list where the value is KeyValuePair<K,V> , and the key is the date / time the item was added.
Peter Ritchie
source share