A Mostly Complete Guide to C# 11’s Future Features

What stays in? What gets cut? Let the speculation begin!

Matthew MacDonald
Young Coder
Published in
12 min readMar 14, 2022

--

Today, it’s called C# Next. It’s still just a bundle of ideas struggling to make it out into the world. But in nine months, parts of C# Next will become the official C# 11. (Side note: That’s a relatively solid deadline, because the evolution of C# is tied to .NET’s November release cadence. In other words, we get .NET 7 in November 2022, and C# 11 comes along for the ride.)

For the next nine months months, we’re going to track the new C# Next features that might make it in to C# 11. That’s possible because the C# team does its language planning in the open. You can see the current status of all the C# Next ideas that are under consideration on GitHub.

But be warned that the features being considered for C# Next won’t all be included in C# 11. In fact, a couple of these features were demonstrated by C# language designers before C# 10, and they still didn’t make it into the final release. Which is good, because nothing kills a mature language faster than wedging in a few too many hasty changes without thinking through all the consequences. C# is at a stage where it needs to balance stability, cognitive load, and consistency. Stability, because C# is absolutely uncompromising about backward compatibility, even if something seems a little “off”. Cognitive load, because there are only so many reserved keywords you can use before the language sags under its own weight and new coders shy away from it. And consistency, because sometimes different features start to evolve into the same space that’s already occupied by legacy parts of the C# language. In this case, it doesn’t matter if you could reimplement something more cleanly (events? functional programming?), because we’re never going back to a blank slate.

With that out of the way, let’s look at the lineup of potential features.

  1. Line breaks in embedded expressions
  2. List patterns
  3. Null-checking parameters
  4. Raw string literals
  5. Required members
  6. Semi autoimplemented properties
  7. Primary constructors
  8. UTF8 string literals

--

--

Matthew MacDonald
Young Coder

Teacher, coder, long-ago Microsoft MVP. Author of heavy books. Join Young Coder for a creative take on science and technology. Queries: matthew@prosetech.com