Is there a sorted collection type in .NET?

前端 未结 7 1670
夕颜
夕颜 2020-12-01 08:19

I\'m looking for a container that keeps all its items in order. I looked at SortedList, but that requires a separate key, and does not allow duplicate keys. I could also j

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-01 08:35

    Just to make EBarr's comment as answer, there is SortedSet since .NET 4.0. Of course it is a set, which means you cannot have duplicates.

提交回复
热议问题