StyleCop SA1124 DoNotUseRegions is reasonable?

This is going to be a personal preference thing. The only thing that matters here is what you and your team prefer. Forget what StyleCop says, you're the ones reading it, you're the ones maintaining it, whether with or without regions works better for you, that's all that matters.

If you're releasing it as an open-source project...and this is my opinion here, I think the same applies. Use whatever the core team is more comfortable with. If you get a lot more team members aboard and more contribute, re-visit the issue later, this can always be changed.


There is no more need for regions in well written code. It once was useful to hide machine generated code. Now that code goes in a separate file. Regions can still be used to hide poorly written code.

Tags:

C#

Stylecop