Spaces around multiplication and division operators are deleted by IDE, how to keep them?
Asked Answered
B

1

9

I'm using Visual Studio with ReSharper, and whenever I write something like

a * b

it gets changed to

a*b

Is it a Visual Studio setting or a ReSharper setting? What exactly should I change?

Biserrate answered 25/12, 2012 at 11:52 Comment(1)
This auto formatting has been driving me crazy last 3 years!!!Tadpole
B
19

Go to ReSharper -> Options -> Code Editing -> C# -> Formatting Style -> Spaces.

In the "Around Operators" section, check the box next to "Multiplicative operators (*,/,%)".

Biserrate answered 25/12, 2012 at 11:52 Comment(2)
This doesn't make any difference for me.Bahia
The "Around Operators" section is now called "Around Binary Operators". Thanks much!Hunt

© 2022 - 2024 — McMap. All rights reserved.