Regions in C#

by Remy van Duijkeren | Apr 11, 2023 | Shorts

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.

Related

Hourly billing is nuts.

Hourly billing is nuts. Because the slower someone works, the more you pay. And the faster someone is… the more they get punished. Great system,...

Read More

Hourly billing hates seniors.

Hourly billing hates seniors. Agencies don’t hate us. But the math definitely does. - Seniors cost more. - Hourly margins get thin. - Juniors become...

Read More