docs icon indicating copy to clipboard operation
docs copied to clipboard

Primary constructor editorconfig rule based on target type?

Open aventus13 opened this issue 2 years ago • 2 comments

Primary constructors can be controlled by csharp_style_prefer_primary_constructors editorconfig rule. However, this rule would apply to all types. My team uses primary constructors for immutable data bags defined as records and classic constructors for classes. Is there a way to have this rule differentiate between a record and a class type?

aventus13 avatar Jan 05 '24 11:01 aventus13

@aventus13 Not sure if you're aware but you've created this issue in the docs repo. This behavior is determined by the compiler so if you want to raise this issue it should be done in the roslyn repo.

irontoby avatar Nov 11 '25 22:11 irontoby

You'll need to open this in the roslyn repo. I can't transfer the issue.

adegeo avatar Aug 07 '26 02:08 adegeo