Member-only story
What’s New in C# 14: Extension Members, Backing Fields, and Null-Conditional Assignments
C# 14, released in April 2025 with .NET 10 and Visual Studio 2022 support, brings several developer-friendly improvements.
C# 14 was released in April 2025, and I just had time to look at it. It is supported by Visual Studio 2022, and .NET 10 SDK. Let’s go over the most important changes.
1. Extension Members
Extension members may be part of the C# that isn’t fully in line with OOP, but it turns out to be really useful to work with the code. It is a technique to add stuff to types without creating derived type, recompiling or modifying existing type.
So instead of classically extending type and then casting it, you do something else. You declare your extending members in a code that should use them, and now, a base type automatically includes your extensions.
Hi! My name is Tom Smykowski, and I’m writing about the most important things happening in programming world!
Here’s an example of an extension function from the docs. Let’s say you have a
public class DomainEntity
{
public int Id { get; set; }
public required string FirstName { get; set; }
public required string LastName { get; set; }
}And you want to extend it with a property called FullName. Before you could only extend…
