How do you change Visual Studio's options for formatting the modulus (%) operator?
For example, whenever I type the line
int x = a % b;
Visual Studio changes it to
int x = a%b;
when I type the semi-colon. I would prefer that it automatically add spaces around the modulus operator instead of take them away.
tools -> options -> text editor -> c# -> formatting -> spacing:
Turns out Resharper was the culprit. Went to Resharper >> Options... >> Code Editing >> C# >> Formatting Style >> Spaces >> Around Operators >> Multiplicative operators.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With