I have a Dictionary<int, double>
and i want to custom sort it. But is it a little different sorting.
For example here is the codes:
Dictionary<int, double> dicZeroPeriods = new Dictionary<int, double>();
dicZeroPeriods.Add (80,-3.5);
dicZeroPeriods.Add (90,-2.4);
dicZeroPeriods.Add (50,4.2);
dicZeroPeriods.Add (65,1.2);
So how can i custom sort the dicZeroPeriods
by value base near zero. I mean the result should be:
65,1.2
90,-2.4
80,-3.5
50,4.2