Removing byte array allocations using ReadOnlySpan

#607 – May 10, 2026

no matter which version of .NET you're targeting

Removing byte array allocations using ReadOnlySpan
20 minutes by Andrew Lock

Andrew describes a simple way to remove some byte array allocations, no matter which version of .NET you're targeting, including .NET Framework. He looks at the changes to your C# code to reduce the allocations, how the compiler implements the change behind the scenes, and some of the caveats and sharp edges to watch out for.

The end of push-wait-guess CI
sponsored by Depot

Edit YAML, commit, push, wait, squint at logs, guess, repeat. That was CI debugging. Watts, an engineer at Depot, walks through how Depot CI replaces the push-and-pray cycle with a local loop you can actually control. Run your existing GitHub Actions workflows against uncommitted changes, scope runs to a single job, and SSH into the runner mid-build to debug your environment in real-time.

C# records
3 minutes by Ricardo Peres

C# records are a cleaner way to define classes and structs. They come with built-in equality checks, hash codes, and string output, so you don't need to write that code yourself. Properties defined in the primary constructor are read-only by default, making records a good fit for immutable data. One thing to watch out for is circular references, which will cause an error when calling ToString.

Clean architecture vs onion architecture in .NET
1 minute by Yohan Malshika

When building modern applications using .NET, one of the biggest challenges is structuring it in a way that remains clean, testable, and easy to change over time. Two popular approaches that solve this problem are Clean Architecture and Onion Architecture. Yohan explains both in a simple, practical way, especially from a .NET developer’s perspective.

Validating configuration at startup with IValidateOptions
3 minutes by Bart Wullems

Configuration binding in .NET won't catch missing or invalid values, so apps can start fine and break later in production. IValidateOptions lets you write a dedicated validator class that the framework runs automatically at startup. Unlike Data Annotations, it supports cross-property rules and can use injected services. Pair it with ValidateOnStart() to fail fast before your app accepts traffic.

Discriminated unions in C# and .NET 11
5 minutes by DeeDee Walsh

C# finally has union types in .NET 11, giving developers a clean way to return multiple possible result types from a function. This is especially useful for modernizing VB6, PowerBuilder, and Clarion applications that rely on Variant-style returns. Unions make translated code more readable, safer, and easier to maintain by allowing compiler-checked handling of every possible outcome, reducing the need for error-prone workarounds like nullable wrappers or custom result classes.

And the most popular article from the last issue was:

newsletters