If you work in a lot of environments you will be used to a wide array of different coding styles, curly braces, no curly braces, comments, no-comments.. the list can go on and on and be very heatedly debated by engineers. If you’re like me, I configure re-sharper once in a blue moon and then completely forget, so here is my list of top re-sharper tweaks:
How to adjust the placement of using directives either inside or outside of the namespace
Code Editing -> C# -> Code Style -> Reference Qualification -> Add ‘using’ directive to deepest scope
If you have ‘deepest scope’ enabled, your using imports will be within your namespace. If you uncheck it, resharpen will automatically add them to the outside.
Options -> Languages -> C# -> Formatting Style -> Namespace Imports -> Add using directive to the deepest scope
Removing / Adding the ‘this’ qualifier
Code Editing -> C# -> Code Style -> Instance members qualification – > Use “this.” qualifier for
Options -> Languages -> C# -> Formatting Style -> Other -> Force “this.” qualifier for instance member