IEquatable in C#: Why Every .NET Developer Should Master Custom Equality

Master IEquatable in C# to optimize equality checks, improve collection performance, and eliminate boxing overhead. Essential for value types and collections.

July 16, 2025 · 9 min · 1644 words · Abhinaw

Avoiding Boxing with Struct Dictionary Keys in C#: Performance and Best Practices

Discover why structs as dictionary keys can cause hidden allocations in C#. Learn how to implement IEquatable, use readonly and record structs, and write allocation-free, high-performance code for hot paths.

July 6, 2025 · 4 min · 695 words · Abhinaw