Primary Constructors in C# 12 - WORTH IT?
Claudio Bernasconi Claudio Bernasconi
17.5K subscribers
1,871 views
65

 Published On Sep 28, 2023

Today, we want to learn about one of the new C# 12 features coming with .NET 8 in November 2023. We will learn what Primary Constructors are, how to define them, and when to use them.

00:00 Introduction
00:16 Primary Constructors in Action
02:24 Secondary Constructors
02:57 ASP.NET Core WebAPI - Dependency Injection Example
03:49 Primary Constructors Generatees Mutable Fields
04:22 Immutable Fields (readonly)
05:25 Comparison with Record Types
06:38 When to Use Primary Constructors?
07:35 Conclusion

šŸ”„ C#/.NET Bootcamp: The Fundamentals & more (Code FRIENDS10 for 10% OFF)*
https://claudiobernasconi.ch/dotnet-c...

šŸ“Œ .NET Developer Roadmap
https://claudiobernasconi.ch/learn-do...

šŸ“Œ YouTube Playlists:
The FREE Blazor Crash Course: Ā Ā Ā ā€¢Ā TheĀ FREEĀ BlazorĀ CrashĀ CourseĀ (.NETĀ 5)...Ā Ā 
Blazor: Ā Ā Ā ā€¢Ā BlazorĀ Ā 

āœ… SUBSCRIBE FOR MORE VIDEOS
Subscribe: šŸ”” https://claudiobernasconi.ch/Subscribe

šŸš€ CONNECT & SUPPORT
Twitter: Ā Ā /Ā chbernasconicĀ Ā 
Blog: https://claudiobernasconi.ch
Newsletter: https://claudiobernasconi.ch/newsletter

* Affiliate Link: I earn a small commission at no additional cost

show more

Share/Embed