I’m not a fan of seeing regions in my code and, by default, ReSharper is configured to group members (methods, interface implementations, etc) with regions when running the Code Cleanup utility. I’ve turned this off a couple of times but it usually takes some poking around until I remember what to do again.
From within Visual Studio, open ReSharper –> Options.
Then, under Languages –> C#, select “Type Members Layout”
Uncheck the “Use Default Patterns” checkbox
Throughout the XML configuration document, you’ll notice various “Group” nodes which are used to create regions for specific element types. Deleting all these nodes will keep ReSharper from adding regions when running Code Cleanup.
If you really dislike regions, you can also configure ReSharper to remove all existing regions as well. Find the default pattern node…
…and add a flag to remove all regions.
Much better!
Thanks – personally I hate regions. IMHO if you need them, your classes are too big.