compares strings, not numbers. The reason you are seeing the -2 and 2 returning 1 is because the language is trying to determine where the numbers fit in terms of sorting them as words. ie if you tried to do
you will get the same result.
If comparing numbers, they should be converted to numbers. You can try to overload the
method and using the
as a third parameter and that should fix the problem.
There is more discussion on MSDN http://msdn.microsoft.com/en-us/library/system.globalization.compareoptions.aspx