Tag: c#


New System.Collections.Frozen namespace in .NET 8

The .NET 8 release introduces a new namespace, System.Collections.Frozen, which provides two new immutable collection types: FrozenDictionary<TKey, TValue> and FrozenSet<T> These types are designed for scenarios where collections are created infrequently but are used frequently at runtime. They offer excellent lookup performance and are ideal for cases where a collection is created once, potentially at […]


Do not throw Exceptions in C#

Exception handling is a crucial aspect of software development, and the concern about its performance implications is valid. In this blog post, we’ll explore the idea of avoiding exceptions to control the flow of code in C# and opting for alternative approaches to achieve the same results more efficiently. We’ll delve into why exceptions can […]