Skip to main content

Posts

Featured

Shiny & New - C# Primary Constructors

C# v12.0, part of .NET 8, introduces a feature called Primary Constructors. Primary constructors are one of those features introduced to C# whose purpose is to simplify class and struct definitions by reducing the amount of code that needs to be written. However, they also have some potential for introducing confusion. In this post I'll look at the essentials of using primary constructors, but also investigate how they compare with other established C# features, and some recommendations for introducing them in C# code.

Latest Posts

C# Unsung Heroes: the Value Tuple

Record Structs and Property Initializers