By default, the operator == == // "> checks the reference equality to determine if two references point to the same object, therefore, to get this functionality, the reference types do not need to implement operator ==. When the type is immutable, that is, data contained in the instance cannot be changed, overloading the == operator to compare the equality of values โโinstead of reference equality can be useful, since they can be considered the same as immutable objects if they have the same value. ATOR == in immutable types is not recommended.
Equals is a virtual method that allows any class to override its implementation. Any class that represents a value, essentially any type of value or a group of values, such as a complex number class, must override Equals. If the type implements IComparable, it must override Equals.
source share