SortedList

2019-03-29  本文已影响0人  津涵

one value per key 一键一值

SortedList<TKey, TValue>

multiple values per key 一键多值

Lookup<TKey, TElement>

SortedList与SortedDictionary

1)SortedList<TKey, TValue> uses less memory than SortedDictionary<TKey, TValue>.
2)SortedDictionary<TKey, TValue> has faster insertion and removal of elements.
3)When populating the collection with already sorted data, SortedList<TKey, TValue> is faster if capacity changes are not needed.

上一篇下一篇

猜你喜欢

热点阅读