Post

Yeah it was the "it's not cool to use goto in c#". Fun fact it was code extracted from Microsoft Commerce Server. It was a pain to extract so I didn't find it that funny to be ridculed. I think today I would be more "Screw you. It works. :)"

When you initially write the code, it might feel cleaner and easier to read. However, the larger expense in software is often maintenance. We can't predict these things, but in a worse case scenario with many bugs and new features, the goto could be much more harmful.

Heavily dependent on context and the problem to solve, but at first blush it seems like refactoring duplicate code into a method and using if statements to differentiate the rest might be my first try.