Tuesday, January 18, 2011

Do not use regions

"A violation of this rule occurs whenever a region is placed anywhere within the code. In many editors, including Visual Studio, the region will appear collapsed by default, hiding the code within the region. It is generally a bad practice to hide code, as this can lead to bad decisions as the code is maintained over time." - one of readability rules of style cope.

If you have regions in your code, you can solve this problem in Visual Studio 2010 by expanding all regions by default.

Got to 'Tools->Option->Text Editor->C#->Advanced' and 'Enter outlining mode when files open' must be unchecked.

No comments:

Post a Comment