Editorconfig Guide.e

Parentheses in other operators

EditorConfig key: dotnet-style-parentheses-in-other-operators

Parentheses in other operators

dotnet-style-parentheses-in-other-operators

This option controls whether parentheses should be used around expressions involving operators that are not otherwise covered.

Default value:

always_for_clarity

Possible values:

  • always_for_clarity
  • never_if_unnecessary

Examples

always_for_clarity
var value = (a.b).Length;
never_if_unnecessary
var value = a.b.Length;