How to set assignment format?


I have a huge codebase that has thousands of assignments in an 'var x=new X();' format, rather than a 'var x = new X();'.  Its just missing the space on either side of the '=' which is recommended according to our coding standards.

How do I edit the resharper settings so that when I do a code cleanup it automatically inserts the spaces?


1 comment

ReSharper => Options.
Under Languages, C#, Formatting Style, Spaces
In the Around Operators check the Assignment operators.

The problem is going to be getting R# to only change that formatting and leave other things alone...


Please sign in to leave a comment.