Using Primary Constructors with Classes and Structs in C# 12 / .NET 8

As part of C# 12, we got a new feature called primary constructors. Let&rsquo;s see how they work and what we can do with them.