I’ve programmed C# for nearly 15 years, and have used goto
twice . Once to simplify an early break from a nested loop, essentially a nested continue
. The second was to refactor a giant switch statement in a parser, essentially removing convoluted while
loops, and just did a goto
the start.
It’s one of those things that almost should never be used, but the times it’s been needed, it removed a lot of silliness.
Programming is mostly research. Researching curses to cast on the guy who wrote the Incomprehensible mess you’re currently debugging.