Enumerating Concurrent Collections with Snapshots in C#
Discover how to handle concurrent collection iteration with snapshots, implement health checks in ASP.NET Core, and understand FrozenDictionary performance improvements in .NET 8.
Enumerating concurrent collections with snapshots in C#
3 minutes by Tore Aurstad
Concurrent collections let you add or remove items while looping, unlike regular C# collections that throw errors. To get a stable snapshot during iteration, you can use ToArray(), but it’s expensive because it locks and copies the whole collection.
Implementing Health Checks in ASP.NET WEB API
5 minutes by Abdul Rahman Shabeek Mohamed
This article shows how to add health checks in ASP.NET Core Web APIs. Health checks monitor the app and its dependencies, helping ensure everything is running correctly through regular status checks.
FrozenDictionary under the hood
11 minutes by Alexey Fedorov
This article explains the new FrozenDictionary in .NET 8, an immutable dictionary designed for faster reads than a regular Dictionary. It details different implementations for value types, integers, and strings, how search works using optimized hash tables or bucket sorting, and shows benchmarks comparing performance gains.