Skip to content
0:00 / 0:00

#c#12#primaryconstructors#.net

The New Constructor Type Coming in C# 12 is Weird

Nick Chapsas

429K subscribers • 30 videos on Hallway

YouTube
  • Recommended by 1 person: 1 on Stack Overflow and its sister sites.
  • Presented by Nick Chapsas
  • Linked in the descriptiondotnet/csharplang
  • An opinion. It argues one side of a question engineers disagree on.

Intermediate. Assumes working knowledge.

67K views3 years ago1 recommendation

Programming languagesC# and .NETLanguage design and type systems

Nick Chapsas explores the primary constructors feature in C# 12, analyzing its behavior and looking at the generated IL code.

Enroll to "Cloud Fundamentals: AWS Services for C# Developers" for FREE: bit.ly/3XKUBOH Become a Patreon and get source code access: patreon.com/nickchapsas Hello everybody I'm Nick and in this video I will show you a new feature that will probably be added in C# 12 called Primary Constructors. The proposal: github.com/dotnet/csharplang/issues/2691 Don't forget to comment, like and subscribe :) Social Media: Follow me on GitHub: bit.ly/ChapsasGitHub Follow me on Twitter: bit.ly/ChapsasTwitter Connect on LinkedIn: bit.ly/ChapsasLinkedIn Keep coding merch: keepcoding.shop #csharp #dotnet

Why it's here

1 person recommends this

What people say. Recommended for its explanation of C# 12 primary constructors and their current limitations.

Moments people linked to

jason.kaisersmithon Stack Overflow • Recommends

On “How to make primary constructor parameters readonly?”

Primary constructors are new and there are still some limitations. Making them readonly is currently not possible but should hopefully come soon. This video from Nick Chapsas explains in well, and he looks into the IL code as well. link to this video
6View the answer