Skip to content
Note

Regions in C#

Regions in C# is an anti-pattern or code smell.

When I review, I sometimes see a class that looks decent. Then I open the #region sections and it becomes a big giant monster.

If you think code should be in a #region because it’s a separate step or thing, it should be a method.

Please, don’t hide code with a #region.

Earns Its Keep

Every Sunday, one post on Dataverse, .NET, and whether the tools we rely on still deserve to be there.