You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Prefer primary constructors over regular constructors
5
+
severity: 3
6
+
---
7
+
C# 12 introduced primary constructors, which let you declare constructor parameters directly on the class or record declaration. This reduces boilerplate when the constructor mainly exists to assign dependencies to fields or auto-properties.
0 commit comments