dennisdoomen / CSharpGuidelines

A set of coding guidelines for C# 9.0, design principles and layout rules for improving the overall quality of your code development.
https://www.csharpcodingguidelines.com
Other
746 stars 271 forks source link

AV2400: Add exception for simple properties? #273

Closed bkoelman closed 4 months ago

bkoelman commented 5 months ago

Rule "Use a common layout (AV2400)" states:

Always put opening and closing curly braces on a new line.

I'm wondering if an exception should be added for simple properties/events, which would require to use:

public string Value { get; set; } = "default";

instead of:

public string Value
{
    get; set;
}
= "default";

Thoughts?

dennisdoomen commented 4 months ago

I absolutely agree with that.