I have a List:
List<string> allValues = new List<string>();
It may contain values like this:
-3,003-m
2,086
-1, 006-mx
etc.
I sorted it with this:
allValues = allValues.OrderBy(q => q).ToList<string>();
allValues.Reverse();
The problem is, that it somehow does not differ between normal values and negative ones (I'd expect that to work even if they are strings).
So instead of:
3,001 | 3,003-m | 2,086 | 2,145-m | 1,004 | 0,033 | -1,008-m | -2,490
it looks like this:
3,001 | 3,003-m | 2,086 | -2,490 | 2,145-m | -1,008-m | 1,004 | 0,033
If now negative or positive, it seems to treat them as the same, resulting in a somewhat random sorted List.
I am aware that there might be better approaches to this, but I wanted to know if it is possible to resolve this in this specific scenario.
-mor-mx?