Do you like to have a neat and transparent code base? One of the foundations of this in .NET are regions (#region ...). A smart usage of regions significantly increase readability of the code base, but it can also diminished it if it is misused (typically example would be heavy region usage in methods).
I have find out the following class region structure really neat:

But there is the problem. Maintenance of this structure. But there exists a great tool to this instead of you - Regionerate.
Regionerate is an automatic layout enforcement tool for the C# programming language as it also stated on the
tool's homepage. This tool is Add-in to Visual studio. It is really simple to use, just hit a keyboard shortcut "Ctrl+R" and the tool will do the rest or right click on the code edit panel:

Code became instantly Regionerated. But question arise. In what way code became regionerated? What are the names of the regions which members go into which region? Well there this utility really shines.
You can totally customize it. I will blog about this in another post.
Regions in the upper picture were created with Regionerate tool. Did you notice the number of members in the end of the name of each region? Nice.
Out of the box region structure really did no fit me, so I customize it. You can find the customization file at the end of this blog post.
You can import customization file easily into the tool, just click "Regionerate this" and then "Settings" and just select the proper XML customization file. Tool have some problems with updating or changing customization file, sometimes change is not instantaneous.
It would be nice if you post your favorite region structure in comments.
CustomCodeLayout.xml (2.11 KB)