Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
mrstebo9287yUgh! I always see regions for properties, constructors and public/private methods... Why?! 😫
-
xorith26767y@mrstebo I recently had to pull some legacy end points into a new service layer, and the code had regions that spanned thousands of lines. It was so bad... so so bad.
-
mrstebo9287y@xorith Christ! I have to admit...I used regions when I first started... But it is something that grow out of... Or get beaten out of you 🤣
-
There used to be a plug-in for vs2015 called something like "regions suck" that would always unfold all regions. Unfortunately, it's not available for vs2017, so I turned off all outlining in the settings, which effectively does the same thing, except now I can't do code folding at all (which I never use, anyway).
Related Rants
Without diving into OO or "Micro$oft", I think the one major flaw in C# is the ability to use "regions".
It's like a feature that was specifically designed to hide shitty code.
If you know how to separate your logic properly and focus on good design principles, you should never have to use a "region" to "clean up" the way your source looks!
undefined
regions
bad practices
c#