Published
- 1 min read
sort a dictionary by value in c#
The solution for this is noted below
sort a dictionary by value in c#
Solution
var ordered = dict.OrderBy(x => x.Value).ToDictionary(x => x.Key, x => x.Value);
Try other methods by searching on the site. That is if this doesn’t work