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