C# 14
It is especially relevant when adopting .NET 10 and modern APIs that rely on spans or expressive extension patterns.
Back to overview
Section titled “Back to overview”Extension members
Section titled “Extension members”Extension members expand the extension model beyond classic extension methods.
public static class StringExtensions{ extension(string text) { public bool IsBlank => string.IsNullOrWhiteSpace(text); }}This makes extension-based APIs more expressive by supporting additional member shapes such as properties.
Field-backed properties with field
Section titled “Field-backed properties with field”The field keyword makes it possible to add logic to an auto-property without declaring a separate backing field.
public string Name{ get; set => field = value ?? throw new ArgumentNullException(nameof(value));}Legacy style:
private string _name = "";
public string Name{ get => _name; set => _name = value ?? throw new ArgumentNullException(nameof(value));}Null-conditional assignment
Section titled “Null-conditional assignment”Null-conditional assignment allows conditional assignment through a null-conditional receiver.
person?.Manager = newManager;orders?[index] = replacement;This removes some of the small guard if statements that used to be required.
First-class span conversions
Section titled “First-class span conversions”C# 14 improves built-in support for Span<T> and ReadOnlySpan<T> so these APIs can feel more natural in everyday code.
ReadOnlySpan<char> text = "hello";ReadOnlySpan<int> values = [1, 2, 3];This is especially relevant in performance-oriented code, but it can also make span-based APIs easier to adopt more broadly.