#region Is Fine
Monday, June 18, 2018
Occasionally you’ll encounter someone whining about using C#’s #region / #endregion feature in your code.
The complaints always boil down to one thing: Overuse of regions is indicative of bad design because it promotes hiding flaws in class structure. Mostly they mean that the class is too big and should be split up.
That’s not a necessarily bad observation on its face, but it’s farcical to blame bad design on using regions. If you got rid of regions, your code would still be bad. As a side note, can we also stop using the term “code smell”? I find it grotesque. Anti-pattern is fine, even if it trades its grossness for the sound of conceit.
…