- Loading...
Sponsored by Dometrain Courses—Get 30% off Dometrain Pro with code ANDREW30 and access the best courses for .NET Developers

My new book ASP.NET Core in Action, Third Edition is available now! It supports .NET 7.0, and is available as an eBook or paperback.

Fighting with nullable reference types in Razor Pages
In this post I discuss C#'s nullable reference types in the context of Razor Pages, why they don't play nicely together and how to improve the experience.…

Counting the leading zeroes in a binary number with C#
In this post I describe an algorithm to count the number of leading zeroes in a ulong, study how it works, and benchmark it against alternatives.…
in C#
Working with System.Random and threads safely in .NET Core and .NET Framework
In this post I look at some of the ways you can misuse System.Random, comparing .NET Framework, NET Core, and .NET 6 implementations.…
in C#
Creating a source generator
In this series I describe how to create a source generator, cover issues such as testing the generator, and creating a NuGet package.…

ValueStringBuilder: a stack-based string-builder
A deep dive on StringBuilder - Part 6
In this post I discuss the ValueStringBuilder type, used internally in .NET as a zero/low-allocation alternative to StringBuilder…

Reducing allocations by caching with StringBuilderCache
A deep dive on StringBuilder - Part 5
In this post I look at the internal StringBuilderCache type, benchmark it against a StringBuilder, and walk through the code to show how it works.…

