All rules
IDE2004Language rules (new-line preferences)

Blank line not allowed after constructor initializer colon

Blank line not allowed after constructor initializer colon

Microsoft docs

Description

This style rule enforces that there should not be a blank line after the colon (:) in a constructor initializer. The base() or this() call should immediately follow the colon without any blank lines in between.

Examples

Avoid
// csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
public Class() :
    base()
{
}
Prefer
// csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false
public Class()
    : base()
{
}

Configurable options

Vote for the value each option should take in the generated .editorconfig.

csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental
default: true
Group results
0 yes 0 no
ConsensusNone (disabled)
Severity preference (yes voters)
Suggestion0
Warning0
Error0