Automatic comparison operator overloading in C#
- 📅
- 📝 531 words
- 🕙 3 minutes
- 📦 .NET
- 🏷️ C#
- 💬 1 response
Abhinaba has blogged on the painful C# operator overloading experience.
The basic problem that is if you want to overload one, you soon end up many of the tests including == != < <= > >= Equals, Compare and probably CompareTo via IComparable when it turns out one function can provide everything needed in general use.