All rules
IDE2002Language rules (new-line preferences)
Consecutive braces must not have blank line between them
Consecutive braces must not have blank line between them
Microsoft docsDescription
This style rule enforces that consecutive braces should not have blank lines between them. This helps maintain consistent and clean code formatting.
Examples
Avoid
// csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true
public void Method()
{
if (true)
{
DoWork();
}
} Prefer
// csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
public void Method()
{
if (true)
{
DoWork();
}
}Configurable options
Vote for the value each option should take in the generated .editorconfig.
csharp_style_allow_blank_lines_between_consecutive_braces_experimental default:
trueYour vote
Group results
0 yes 0 no
ConsensusNone (disabled)
Severity preference (yes voters)
Suggestion0
Warning0
Error0