Editorconfig Guide.e

Parentheses in arithmetic binary operators

EditorConfig key: dotnet-style-parentheses-in-arithmetic-binary-operators

Parentheses in arithmetic binary operators

dotnet-style-parentheses-in-arithmetic-binary-operators

This option controls whether parentheses should be used to clarify precedence in expressions using arithmetic binary operators.

Default value:

always_for_clarity

Possible values:

  • always_for_clarity
  • never_if_unnecessary

Examples

always_for_clarity
var value = a + (b * c);
never_if_unnecessary
var value = a + b * c;