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
Watch video Primary Constructors in C# 12 - WORTH IT? online without registration, duration hours minute second in high quality. This video was added by user Claudio Bernasconi 28 September 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,90 once and liked it 6 people.