In the specification found here, I found on page 344 the quote
The signature of a binary operator consists of the operator token (+, -, *, /, %, &, |, ^, <<, >>, ==, !=, >, <, >=, or <=) and the types of the two formal parameters.
The part to note is that "types" is pluralized. In C#, I view binary operators as being similar to methods that take two parameters and returns a value of a given type. The return type must be defined by the types of the two input parameters.
UPDATE:
I decided to add some more, since I find it interesting. In this Eric Lippert Blog Post, he says the following.
[...] it is legal and surprisingly common for a class to implement ==
and Equals
inconsistently.
His entire post is basically how C# defines a whole lot of ways to compare two objects, and nowhere in the specification does it define that they should all behave consistently. Among other things, this means that you can define your own classes A
and B
such that (a as A) == (b as B)
and (a as A) != (b as B)
both evaluate to the same thing.
This just adds a little more punch behind my comment earlier that binary operators are really a lot like methods in this regard. The C# language doesn't give a specific meaning to them, even though we as people find this confusing.