MSDN says:
#region lets you specify a block of code that you can expand or collapse when using the outlining feature of the Visual Studio Code Editor.
For example:
#region MyClass definition
public class MyClass
{
static void Main()
{
}
}
#endregion
Regions the clean solution
Now I know what you might be thinking. What is so bad about that? How could that little region be causing so many problems? It is only there to help clean up your code a little. Ahh but wait. Lets take a closer look at that. It helps clean up your code. Does it? Or does it just make the code LOOK cleaner.
Regions making the ugly look pretty
Sadly, the same thing that spawned the region directive is the same thing it is being misused for now. I will just make a little hack here or there add a region directive and everything will be OK. The sooner everyone stops using regions the sooner developers will stop thinking its Okay to sweep their hacks under a rug that I find myself constantly cleaning.
No comments:
Post a Comment