Dictionary vs HashTable in C#: Key Differences and Best Practices

Introduction If you’ve been working with C# for any length of time, you’ve probably needed to store data as key-value pairs. The two main contenders for this job are Dictionary<TKey, TValue> and HashTable. They both do similar things, but there are some crucial differences that might make you choose one over the other. In this post, I’ll walk you through both options so you can make the right choice for your project. Trust me, this decision matters more than you might think! ...

June 20, 2025 · 5 min · 883 words

Immutability vs Mutability in C#: Understanding the Differences

Introduction If you’ve spent any time building C# applications, you’ve probably run into situations where you need to decide whether your objects should be changeable or locked down after creation. This choice between mutability and immutability isn’t just academic, it can significantly impact how your code behaves, how easy it is to debug, and even how it performs. In this post, I’ll walk you through both approaches and help you figure out which one makes sense for your specific coding challenges. ...

June 20, 2025 · 9 min · 1757 words