Start Debugging

C# 14 features

What actually shipped in C# 14, with code.

This pillar indexes everything I’ve written about C# 14 language features: union types, partial constructors and events, extension types, and the smaller ergonomic wins that are easy to miss in the official release notes.

What to read first

Start with the posts covering union types and partial members if you’re coming from C# 12 - they’re the biggest behavioural changes. Everything else is quality-of-life.

What’s on this page

The list below auto-collects posts tagged with any of: c# 14, csharp 14, c#, csharp, c# language. Newest first.

Index (89 posts)

2026 / 04

2026 / 02

2026 / 01

2025 / 04

2025 / 01

  • .NET Performance: ToList vs ToArray

    .NET 9 significantly improves ToArray performance using InlineArray, making it faster and more memory-efficient than ToList. See benchmarks comparing .NET 8 vs .NET 9.

  • C# 13: Use params collections with any recognized collection type

    C# 13 extends the params modifier beyond arrays to support Span, ReadOnlySpan, IEnumerable, and other collection types, reducing boilerplate and improving flexibility.

  • How to switch to C# 13

    How to fix 'Feature is not available in C# 12.0' and switch your project to C# 13 by changing the target framework or setting LangVersion in your .csproj file.

2024 / 12

  • What’s new in C# 14.0

    A summary of all new features in C# 14.0, including the field keyword, extension members, null-conditional assignment, implicit span conversions, and more.

  • C# language version history

    The evolution of C# has transformed it into a modern, high-performance language. This guide tracks every major milestone. The Early Years (C# 1.0 – 1.2) C# launched in 2002 as a primary language for the .NET Framework. It felt like Java but with a focus on Windows development. Version 1.2 arrived shortly after with small…

2023 / 11

2023 / 10

  • C# – How to mark features as experimental

    Starting with C# 12, a new ExperimentalAttribute lets you mark types, methods, properties, or assemblies as experimental. Learn how to use it with diagnosticId, pragma tags, and UrlFormat.

  • C# – ref readonly parameters

    The ref readonly modifier in C# provides a more transparent way of passing read-only references. Learn how it improves on the in modifier with better constraints and caller visibility.

  • C# – How to shuffle an array?

    The easiest way to shuffle an array in C# is using Random.Shuffle, introduced in .NET 8. It works in-place on both arrays and spans.

  • C# – What is a NullReferenceException, and how to fix it?

    Learn what causes a NullReferenceException in C#, how to debug it, and how to prevent it using null checks, the null-conditional operator, and nullable reference types.

  • Add/Remove TypeInfoResolver to existing JsonSerializerOptions

    Learn how to add or remove TypeInfoResolver instances on existing JsonSerializerOptions using the new TypeInfoResolverChain property in .NET 8.

  • C# 12 – Interceptors

    Learn about C# 12 interceptors, an experimental .NET 8 compiler feature that lets you replace method calls at compile time using the InterceptsLocation attribute.

2023 / 09

2023 / 08

  • C# 12 – Inline arrays

    Inline arrays enable you to create an array of fixed size in a struct type. Such a struct, with an inline buffer, should provide performance comparable to an unsafe fixed size buffer. Inline arrays are mostly to be used by the runtime team and some library authors to improve performance in certain scenarios. You likely…

  • C# 12 – Collection expressions

    C# 12 introduces a new simplified syntax for creating arrays. It looks like this: It’s important to note that the array type needs to be specified explicitly, so you cannot use var for declaring the variable. Similarly, if you wanted to create a Span<int>, you can do: Multi-dimensional arrays The advantages of this terse syntax…

  • C# How to wait for a process to end?

    You can use the WaitForExit method to wait for the process to complete. Your code will wait synchronously for the process to finish, then it will resume execution. Let’s look at an example: The code above will start a new cmd.exe process, and execute the timeout 5 command. The process.WaitForExit() call will force your program…

  • C# 12 – Alias any type

    The using alias directive has been relaxed in C# 12 to allow aliasing any sort of type, not just named types. This means that you can now alias tuples, pointers, array types, generic types, etc. So instead of using the full structural form of a tuple, you can now alias it with a short descriptive…

  • Is there a C# With…End With statement equivalent?

    The With…End With statement in VB allows you to execute a series of statements that repeatedly refer to a single object. Thus the statements can use a simplified syntax for accessing members of the object. For example: Is there a C# syntax equivalent? No. There is not. The closest thing to it would be the…

2023 / 07

  • C# 12 – Primary constructors

    Starting from C# 12, it is possible to define a primary constructor within classes and structs. The parameters are placed in parentheses right after the type name. The parameters of a primary constructor have a broad scope. They can be utilized to initialize properties or fields, serve as variables in methods or local functions, and…

2023 / 06

  • How to start programming with C#

    A beginner's guide to getting started with C# programming, from setting up Visual Studio to writing your first program and finding learning resources.

  • How to switch to C# 12

    Fix C# 12 language version errors by updating your target framework to .NET 8 or setting LangVersion in your .csproj file.

  • What’s new in C# 12

    An overview of new features in C# 12, including primary constructors, default lambda parameters, collection expressions, inline arrays, and more.

2023 / 05

2023 / 03

2020 / 11

2020 / 05

  • C# using var (using declaration)

    Learn how C# 8 using declarations (using var) simplify resource management by eliminating extra curly braces and indentation for IDisposable objects.

2020 / 04

2019 / 01

2013 / 10

2013 / 06

2013 / 05

2012 / 01

All pillars Home