- 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.

Why is string.GetHashCode() different each time I run my program in .NET Core?
In this post I discuss string.GetHashCode(), why it's randomised, and hash-attacks. I also provide a deterministic implementation you can use when it's safe.…

Creating an ASCII-art tree in C#
In this post I describe how to draw a tree-like directory structure using ASCII art in C#…

Creating a .NET Standard Roslyn Analyzer in Visual Studio 2017
In this post, I give a brief introduction to Roslyn analyzers, what they're for, and how to create a simple analyzer in Visual Studio 2017.…

Using anonymous types and tuples to attach correlation IDs to scope state with Serilog and Seq in ASP.NET Core
In this post I describe two extension methods that make logging scopes as key-value pairs nicer in ASP.NET Core, by using anonymous types and tuples.…

Aligning strings within string.Format and interpolated strings
In this post I describe a feature I only recently discovered: alignment in interpolated strings…
in C#
Deconstructors for non-tuple types in C# 7.0
This post takes a look at how to deconstruct non-tuple types in C# 7. Also, learn how to fix the Predefined type 'System.ValueTuple`2' is not defined error.…
in C#

