Implementing Equality Operations
One of the most commonly overloaded operators is ==
(and its !=
sister operator). To ensure expected behavior for those operators, a few guidelines exist. In particular, we have to explain the relationship between the operators and the System.Object.Equals
methods.
Get C# 5.0 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.