All rules
IDE2006Language rules (new-line preferences)
Blank line not allowed after arrow expression clause token
Blank line not allowed after arrow expression clause token
Microsoft docsDescription
This style rule enforces that there should not be blank lines after the arrow (=>) token in expression-bodied members, lambda expressions, or switch expressions. The expression should immediately follow the arrow without any blank lines.
Examples
Avoid
// csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
public int Method() =>
9 + 1; Prefer
// csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = false
public int Method()
=> 9 + 1;Configurable options
Vote for the value each option should take in the generated .editorconfig.
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental default:
trueYour vote
Group results
0 yes 0 no
ConsensusNone (disabled)
Severity preference (yes voters)
Suggestion0
Warning0
Error0