Last Updated: May 22, 2026
C# 12 extended primary constructors, which had been a record-only feature since C# 9, to regular class and struct declarations. The syntax puts a parameter list right on the type header, and those parameters stay in scope across the whole class body. The semantics, though, are different from records in ways that catch people out, so this lesson works through what the compiler actually does and where the rough edges are.