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 that are available.
System.Object, the “mother type of all types”, the
Equals instance method is used to compare whether two objects are “equal,” whatever that means for the types of the target object and the one being compared.