C# Sorting - A Minor Error
Too Long; Didn't Read
It isn't true that the inverse of a negative number is a positive number. The inverse of -2,147,483,648 would cause overflow and returns the same value. The best solution is to simply switch the parameters: CompareTo(y, x). The result is a terrible idea to use CompareTo(-x, -y). Results can be unexpected. The lesson is that we must know the basics of a language not only in terms of syntax but also the inner handling of inner handling.