Sorting a SortedDictionary based on value, not key

后端 未结 4 571
猫巷女王i
猫巷女王i 2021-01-18 18:11

I have a SortedDictionary, the key is a int value and the matching value to each key is a class object. The class contains a int and a two datetime variable.

I need

4条回答
  •  [愿得一人]
    2021-01-18 19:08

    I think you can use SortedSet and Tuple of your key and value, like: SortedSet> ((a,b)=>(a.Item2.CompareTo(b.Item2));

提交回复
热议问题