.net made easy[]

What's New in .NET 11 and C# 15: A Beginner's Guide

All levelsLesson 302 of 325·Production .NET·18 min read·Updated

Every November, .NET gets a new version and C# gets new syntax. This is your plain-English map of what arrived with .NET 11 and C# 15, and what it means for the code you write.

If you've followed this course from the start, you've been writing C# 14 on .NET 10. On 10 November 2026, Microsoft released .NET 11, and with it C# 15. Release notes for a new version are long and full of words like intrinsics and devirtualization, which can make it feel as if you have to start learning all over again.

You don't. Most of a new release happens under the hood: your existing code simply runs a little faster. The parts you do need to learn are small, focused additions, and this Part teaches each one slowly, with examples, in the lessons that follow.

In this lesson, you'll learn what .NET 11 and C# 15 are, how long .NET 11 is supported and how that compares with .NET 10, which new features matter for everyday code, and where in this Part each one is explained step by step.

What Is It?

The Simple Explanation

.NET 11 is the newest version of the .NET platform: the runtime that runs your program, the libraries you call (like List<T> and HttpClient), and the dotnet command-line tools. C# 15 is the newest version of the C# language: the words and symbols you're allowed to write. The two arrive together. When you install the .NET 11 SDK, you get the C# 15 compiler inside it.

Think of .NET as the kitchen and C# as the recipe language. .NET 11 is a renovated kitchen with faster appliances. C# 15 adds a few new words to the recipe language so that some recipes become shorter and safer to write.

The Technical Definition

.NET 11.0.0 was released on 10 November 2026 together with SDK 11.0.100. It is a Standard Term Support (STS) release, supported with fixes and security patches until 14 November 2028. Projects opt in by targeting the framework moniker net11.0. C# 15 is the default language version for projects that target net11.0, so its features work without any extra setting, except the memory-safety work, which is still a preview. You can use the .NET 11 SDK from the command line or with Visual Studio 2026.

.NET 10 (LTS)

  • Released November 2025
  • Long Term Support: supported until 14 November 2028
  • Comes with C# 14
  • Target framework: net10.0
  • A great choice when you want the longest-lived stable base

.NET 11 (STS)

  • Released 10 November 2026
  • Standard Term Support: also supported until 14 November 2028
  • Comes with C# 15
  • Target framework: net11.0
  • A great choice when you want the newest features today

Notice something surprising in that table: .NET 10 and .NET 11 stop being supported on the same day. .NET 10 gets three years of support because it's an LTS release; .NET 11 gets two years because it's an STS release, but it started a year later. Meanwhile, .NET 8 and .NET 9 both reached end of support on 10 November 2026, the same day .NET 11 shipped. If you have an app on either of those, it's time to move.

Why Does It Exist?

The Problem — Software Never Stands Still

Hardware gets faster, cloud platforms change, and developers keep running into the same small annoyances in the language. If .NET only changed every five years, every release would be a giant, risky jump. Teams would put off upgrading, and security fixes would be harder to deliver.

The Solution — A Predictable Yearly Release

Microsoft ships a new major version of .NET every November, alongside a new version of C#. Even-numbered versions (.NET 8, .NET 10) are LTS, supported for three years. Odd-numbered versions (.NET 9, .NET 11) are STS, supported for two years. Because the schedule is predictable, teams can plan: some upgrade every year to get new features, others jump from one LTS release to the next.

Big Picture

C# 15 (the language)
Union types, closed hierarchies, collection expression arguments, extension indexers, labeled break and continue
The runtime
Runtime async (preview), JIT speed-ups, a more modern minimum CPU
The libraries
LINQ FullJoin, one-line process helpers, new Stream types, JSON union and JSON Lines support
Tools and frameworks
dotnet run -e, multi-file file-based apps, an MCP server template, ASP.NET Core 11 and EF Core 11

How It Works

FROM "NEW VERSION RELEASED" TO "NEW FEATURES WORK IN MY PROJECT"
1. INSTALL THE .NET 11 SDK
  • Download it from the official .NET download page, then check it in a terminal with dotnet --list-sdks. You should see a line starting with 11.0.
  • Installing a new SDK does not remove older ones. .NET 10 projects keep working.
▼
2. TARGET net11.0 IN THE PROJECT FILE
<TargetFramework>net11.0</TargetFramework>
▼
3. C# 15 SWITCHES ON AUTOMATICALLY
  • The compiler picks the default C# version from the target framework. net11.0 means C# 15. You don't need a LangVersion setting.
▼
4. BUILD AND RUN AS USUAL
  • dotnet build and dotnet run work exactly as before. Your old code compiles unchanged, and the new syntax is now available.

The C# 15 Features on One Page

Here is every C# 15 feature with a one-line taste. Each of the first five has its own full lesson in this Part, so don't worry if a line looks unfamiliar right now.

1. Union types — "this value is one of these types"

public union Pet(Cat, Dog, Bird); // a Pet holds exactly one Cat, Dog or Bird

A union lets one variable hold one of a fixed list of types, and the compiler checks that your switch handles every one. See lesson 348.

2. Closed hierarchies — "only these subclasses, ever"

public closed record class JobStatus; // only this project may add subclasses public record class Queued : JobStatus; public record class Done : JobStatus;

The closed keyword fixes the list of direct subclasses, so a switch over them needs no default case. See lesson 349.

3. Collection expression arguments — settings inside the brackets

HashSet<string> tags = [with(StringComparer.OrdinalIgnoreCase), "C#", "c#"]; // 1 item

A with(...) element at the start of [...] passes arguments such as a capacity or a comparer to the collection. See lesson 350.

4. Extension indexers — square brackets on types you don't own

extension(IEnumerable<int> sequence) { public int this[int index] => sequence.ElementAt(index); }

C# 14's extension blocks can now declare indexers too. See lesson 351.

5. Labeled break and continue — jump out of nested loops cleanly

outer: for (int row = 0; row < 3; row++) { for (int col = 0; col < 3; col++) { if (col == row) continue outer; // skip straight to the next row } }

No more Boolean flags or goto to escape two loops at once. See lesson 352.

6. Two smaller additions

What's New in the Platform

When you're ready to move a real project across, lesson 356 walks through the upgrade step by step.

Simple Example

Here is a complete little program that uses two C# 15 features. Put it in Program.cs in a project that targets net11.0, then run dotnet run.

// Program.cs: a first taste of C# 15 (needs the .NET 11 SDK) HashSet<string> seen = [with(StringComparer.OrdinalIgnoreCase), "Apple", "APPLE", "Banana"]; Console.WriteLine(seen.Count); // 2: "Apple" and "APPLE" count as the same word Shape shape = new Circle(2.0); Console.WriteLine(Area(shape)); // 12.566370614359172 static double Area(Shape shape) => shape switch { Circle c => Math.PI * c.Radius * c.Radius, Square s => s.Side * s.Side, }; public record class Circle(double Radius); public record class Square(double Side); public union Shape(Circle, Square);

Code → Meaning → Result: The first two lines create a set that ignores upper and lower case, so the two spellings of "Apple" collapse into one entry. The rest declares a Shape that is either a Circle or a Square. The switch has no default arm, and it doesn't need one: the compiler knows those are the only two possibilities.

Real-World Example

Imagine you lead a small team with three apps: an internal tool on .NET 8, a customer website on .NET 9, and a brand-new API you're about to start. Here's how the release affects each one:

Analogy

A Yearly Phone Update

Your phone gets a big software update once a year. Most of it you never notice: things open a bit faster and the battery lasts longer. A few new buttons appear, and you learn them when you need them.

Some phone models get updates for longer than others. .NET works the same way: every version gets the yearly speed-ups, LTS versions are the "long support" models, and STS versions are the "newest features" models. Neither is a beta; both are finished products.

Under the Hood

Common Confusion

1. "STS means beta or unstable" — no, it's only about how long support lasts

STS releases go through the same testing as LTS releases and are fully supported in production. The only difference is the length of the support window: two years instead of three.

2. "Installing the .NET 11 SDK upgrades all my projects" — no, each project chooses its target

A project keeps targeting whatever its <TargetFramework> says. Nothing changes until you edit that line to net11.0.

3. "I have to rewrite my code for the new version" — no, old code keeps working

C# almost never removes features. The new syntax is optional, and you can adopt it one file at a time, or not at all.

Common Mistakes

Mistake 1 — Turning on preview features in production code

The mistake: Enabling runtime async for your own code, or <LangVersion>preview</LangVersion> for memory safety, in an app that serves real customers, because they sounded exciting in the release notes.

The fix: Use preview features in experiments and side projects first. The rest of C# 15 and .NET 11 is fully released and safe to use.

Mistake 2 — Forgetting that .NET 8 and .NET 9 are now out of support

The mistake: Leaving an app on .NET 8 or .NET 9 after 10 November 2026. It keeps running, but it no longer receives security fixes.

The fix: Plan a move to .NET 10 or .NET 11. Lesson 356 shows the steps.

When Should I Use It?

Mental Model

.NET 11 = the platform (runtime, libraries, tools). C# 15 = the language. They ship together every November.
LTS (even numbers) = 3 years of support. STS (odd numbers) = 2 years. Both are production-ready.
net11.0 in the project file turns on C# 15 automatically.

Remember: .NET 11 makes your existing code faster for free; C# 15 adds a handful of new words you can learn one at a time.

Key Takeaway


Check Your Understanding

Three quick questions to check the big picture landed.

1. How long is .NET 11 supported, and how does that compare with .NET 10?

Show answer

Correct: B

Why B is correct: .NET 11 is an STS release supported until 14 November 2028. .NET 10 is an LTS release that started a year earlier, so its three years also end on 14 November 2028.

Why A is incorrect: STS releases now get two years of support, so a November 2026 release is supported until November 2028.

Why C is incorrect: No .NET version is supported forever. Every release has a fixed end-of-support date.

Why D is incorrect: Neither version is supported into 2029; both end in November 2028.

Reinforcement: Even = LTS (3 years), odd = STS (2 years), and this time both windows end on the same day.

2. You install the .NET 11 SDK. Which project automatically compiles with C# 15?

Show answer

Correct: C

Why C is correct: The default C# version comes from the target framework. net11.0 projects get C# 15; a net10.0 project stays on C# 14 by default.

Why A is incorrect: Installing an SDK doesn't change any project's settings. Each project's target framework decides its default language version.

Why B is incorrect: net10.0 projects default to C# 14, the language version that shipped with .NET 10.

Why D is incorrect: Apart from the memory-safety preview, C# 15 features are fully released and need no preview setting.

Reinforcement: Change net10.0 to net11.0 and C# 15 switches on by itself.

3. What does STS mean for an app you run in production?

Show answer

Correct: B

Why B is correct: STS (Standard Term Support) releases are finished, production-ready releases. They're supported for two years instead of three.

Why A is incorrect: STS isn't a preview or beta. Preview builds come out months before release day.

Why C is incorrect: .NET 11 runs on Windows, macOS and Linux, just like .NET 10.

Why D is incorrect: You can use the .NET 11 SDK with Visual Studio 2026, or from the command line with any editor.

Reinforcement: STS vs LTS is only about how long support lasts, not about quality.

You now have the map. The next lesson starts the tour with the biggest new language feature: union types, a way to say "this value is exactly one of these types" and have the compiler check every case for you.