In C #, = and! = By default, the reference address is compared. If you want to change it to compare its connotation, You need to reload it. Generally, two operators and two functions need to be reloaded: The Equals function, the GetHashCode function, the operator =, and the operator! = There are two groups: The Equals function and the GetHashCode function. This group is used when the system compares objects. For example, if an object is placed in the Hashtable container, the system will compare and reject the same objects. The Equals and GetHashCode functions must be reloaded together. When you compare the meanings of two objects, do not reload = and! =, You can directly use the Overload Equals, but if the overload is used = and! =, It will be more intuitive. The two operators must be reloaded at the same time. If only one operator is reloaded, the compiler will prompt accordingly. Return to F #, corresponding to C #== and! = And <>. If you try to reload = or <>, the compiler will prompt you to reload Equals. When you call operators = and <>, Equals is automatically called. However, to Overload Equals, you must overload GetHashCode. So we can just reload this group of functions.