In this deep dive article on equal operator overloading Jonathan Allen clears the air on overriding the equality operator. In the article Jonathan provides code samples in both VB and C# to demonstrate the nuances of each .NET language. He also covers usage in both structures and classes.
Areas covered include:
- The initial Class signature
- Fields and Properties
- Type-Safe Equality
- Hash Codes
- Overriding the base class Equals method
- Performance and Testing
Enjoy this well-thought through tutorial on Equality Operator overloading.