CA2226: Operators should have symmetrical overloads
Visual Studio 2010
TypeName | OperatorsShouldHaveSymmetricalOverloads |
CheckId | CA2226 |
Category | Microsoft.Usage |
Breaking Change | Non Breaking |
There are no circumstances where either equality or inequality is applicable to instances of a type, and the opposite operator is undefined. Types typically implement the inequality operator by returning the negated value of the equality operator.
The C# compiler issues an error for violations of this rule.