Adding code to regions during Resharpers code cleanup

by Bobby Cannon July 08, 2010 01:35 PM
More details to come as to how this works. However you can paste this code into Resharper's Options -> Languages -> C# : Type Members Layout. Simply uncheck the box "Use Default Patterns" and overwrite the custom pattern with the pattern below. More...

Tags: ,

Configuration

Remove Regions with Resharper

by Bobby Cannon July 07, 2010 08:27 PM

I am an avid ReSharper user and I couldn't seem to figure out how to get the code cleanup to remove "regions". I found this little bit of info so I thought I would pass it on.

  • Go to ReSharper | Options
  • Under Language Options, expand C#, then Formatting Style
  • Select Type Members Layout
  • Uncheck "Use Default Patterns" and don't be alarmed at all the text that appears
  • Remove it all and add the text in the <code> block.
Code<?xml version="1.0" encoding="utf-8" ?>
<Patterns xmlns="urn:shemas-jetbrains-com:member-reordering-patterns">
  <Pattern RemoveAllRegions="true">
     <Entry />
  </Pattern>
</Patterns>

Tags: ,

Programming | Configuration

Month List