Steve Fenton


You can subscribe to the c# tag micro-feed.

Parameter Null Checking in C#

Last month, some eagle-eyed folk spotted a change in the C# 11 pipeline. This triggered a fair bit of discussion about the new feature. In this post I’ll dig a bit into the decision and explain a bit more about the feature. What is parameter null checking? Let’s start by looking at the feature. For […]

New in C# 11, there is a feature that I think will become highly popular. That feature is raw string literals. There have been a few different modifiers for string literals before now that work in various scenarios such as changing “c:\\temp” to @”c:\temp” or using template literals with a $. However, in all these […]

De-mystifying Linq

This post is a summary of the De-mystifying Linq session I ran on 24th January. The examples below were just on-the-spot examples created during the talk… The System.Linq namespace can seem a bit like magic, but it can be useful to demystify it by showing that it is actually just some C# code that we […]

Automatically fix your namespaces

It is pretty common to clean up a project or solution to move the class files into a better organised folder structure. When you do this, the namespaces often end up reflecting their old location, not the better new location you moved them to. The task of manually updating the namespace and then fixing all […]

Introducing an async pipeline in C#

Pipelines are an interesting way to implement your code to prevent complex inter-relationships between components. Having used pipelines on some simple synchronous code, I wanted to see what happens when you try it with async code. Using a real app is a useful way to explore this, but I warn you now; there are some […]

C# namespace declarations

Unlike my recent article on Global Using Statement and Code Clues, the new namespace declarations have no trade offs and you should just auto-fix them in your whole project and move on with your life. Here’s how we do namespace before namespace declarations: namespace Fenton.Sample.UI { public class Example { } } …and here is […]