This post is for C# Advent Calendar 2020 organized by Matthew Groves. I recommend that you check out some of the other posts being published throughout December! In this post, I thought it was long overdue that I spent a little time playing around with some new C# 9 language features. C# 9 introduced quite […]
Category: C#

.NET Performance Optimisations Don’t Have to be Complex
Readers who have followed me for some time will know that I have developed a bit of a passion for performance improvements and avoiding allocations in critical code paths. Previous blog posts have touched on examples of using Span<T> as one mechanism to prevent allocations when parsing data and using ArrayPool to avoid array allocations […]

C# 8.0: Understanding Using Declarations
In this post, I introduce a simple new language feature of C# 8 called using declarations. Based on the odd tweet or two that I have seen pass through my Twitter feed, this feature is like Marmite (sorry, UK reference there). You either love it or you hate it. The opinions seem to be quite […]

Using the BodyReader and BodyWriter in ASP.NET Core 3.0 Utilising System.IO.Pipelines for High-Performance ASP.NET Core 3.0
In this post, I will describe a scenario and potential use case for the BodyReader and BodyWriter properties which are now exposed in ASP.NET Core 3.0 via the HttpContext on the HttpRequest and HttpResponse respectively. Note, that I’m working with these during Preview 6 of the 3.0 release, so things may have changed a little […]