.NET 10 shipped in November 2025 as a long-term support release, supported until November 2028, and C# 14 arrived with it. The language changes are about removing ceremony: extension members let you add properties and static members to types you do not own, the field keyword ends the backing-field boilerplate, and you can now run a single .cs file with no project at all.
Extension members#
Extension methods have existed since C# 3, but only methods. C# 14 adds an extension block that can declare properties, static members and operators against a type:
public static class EnumerableExtensions
{
extension<T>(IEnumerable<T> source)
{
// an extension property - no parentheses at the call site
public bool IsEmpty => !source.Any();
// an ordinary extension method, new syntax
public IEnumerable<T> WhereNotNull() => source.Where(x => x is not null);
}
extension(string)
{
// a static extension member, called as string.Join2(...)
public static string JoinLines(IEnumerable<string> lines) => string.Join('\n', lines);
}
}
var names = new List<string>();
if (names.IsEmpty) { ... }
The old this-parameter syntax still works and is not deprecated. Use the block form when you want properties or statics, or when you are adding several members to one type and would rather write the receiver once.
The field keyword#
A property that needs one line of validation used to force you to declare a private backing field by hand. Now field refers to the compiler-generated one:
// Before
private string _name = "";
public string Name
{
get => _name;
set => _name = value ?? throw new ArgumentNullException(nameof(value));
}
// C# 14
public string Name
{
get;
set => field = value ?? throw new ArgumentNullException(nameof(value));
}
Lazy initialisation reads well too: get => field ??= Compute();. Because field is now a keyword inside property accessors, a class with a member actually named field needs @field there; the compiler warns about it.
File-based apps#
A single C# file can now be a program, no .csproj required:
#:package Humanizer@2.14.1
using Humanizer;
Console.WriteLine(DateTime.Now.AddDays(-3).Humanize());
dotnet run hello.cs
The #:package directive pulls in a NuGet package; #:sdk and #:property directives set the SDK and MSBuild properties. When a script outgrows one file, dotnet project convert hello.cs turns it into a normal project. This makes C# usable for the quick utilities that used to go to Python or PowerShell by default.
Smaller language changes#
- Null-conditional assignment.
customer?.Address = newAddress;assigns only whencustomeris not null. - Implicit span conversions. Arrays and strings convert to
Span<T>andReadOnlySpan<T>more naturally, so span-based APIs are less awkward to call. - nameof on unbound generics.
nameof(List<>)is now legal and gives “List”. - Lambda parameter modifiers without types.
(ref x) => ...no longer needs the type spelled out. - Partial constructors and events. Rounds out partial members for source generators.
- User-defined compound assignment. Types can define
+=directly rather than via+, which avoids allocating for large value types.
What .NET 10 brings#
Beyond the language:
- Runtime and JIT improvements across the board, particularly for loops, inlining and struct handling. Most applications get faster by recompiling.
- ASP.NET Core: passkey support in Identity, better minimal-API validation, Blazor WebAssembly preloading and diagnostics improvements.
- Entity Framework Core 10: LINQ improvements and better complex-type support.
- .NET Aspire continues as the opinionated way to run multi-service applications locally, with tooling for inspecting AI calls.
- C# Dev Kit and Visual Studio 2026 target it out of the box.
Upgrading#
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>14</LangVersion> <!-- optional; net10.0 implies it -->
</PropertyGroup>
dotnet --list-sdks
dotnet outdated # or check packages manually
dotnet build
dotnet test
Breaking changes are few and documented per area. The ones that bite most often are in ASP.NET Core defaults and in analysers that became errors; read the migration notes for the areas you use rather than the whole list.
Questions people ask#
Is C# 14 available on .NET 8?
With the .NET 10 SDK installed and LangVersion set to 14, most features compile for net8.0. Features that rely on runtime support do not.
Do extension members replace the old syntax?
No. Both coexist. Existing extension methods need no changes.
How long is .NET 10 supported?
Until November 2028, three years from release, as with every even-numbered LTS.
Should I skip to .NET 11?
.NET 11 will be a short-term release in November 2026. For anything you maintain long term, stay on 10 until .NET 12.
Where to go next#
- C# 14 extension members explained — the headline feature in depth.
- .NET 9 vs .NET 10 — the upgrade decision.
- C# advanced language features — the wider language.