Here’s a silly little C# pop-quiz about equality. Given a local variable x declared of type ‘int’, what do the following C# expressions evaluate to?
For bonus points, identify any additional work in each expression that’s not directly comparing equality of two integers.
[Update] To simplify, assume an unchecked context (which is the default). I've posted the answers here
[Update] If you think changing operator== to Object.Equals will solve all your problems, try this related quiz here .