Sorting a Dictionary in place with respect to keys

前端 未结 7 1257
广开言路
广开言路 2020-11-29 04:49

I have a dictionary in C# like

Dictionary

and I want to sort that dictionary in place with respect to keys (a f

7条回答
  •  旧巷少年郎
    2020-11-29 05:44

    Take a look at SortedDictionary, there's even a constructor overload so you can pass in your own IComparable for the comparisons.

提交回复
热议问题