The goto Statement
In true C and C++ style, C# provides a
goto statement to perform unconditional control transfer to a point in the code marked by a label. The greatest computer scientists have debated the use of
goto for years:
Edsger Dijkstra, a Dutch computer scientist, published his infamous paper “Go To Statement Considered Harmful” in 1968. At that time, structured programming (
while, and so on) was gaining popularity, and most typical cases of
goto got eliminated by it. And true, use of
goto all over the place quickly results in spaghetti code.
Donald Knuth, known for his “The Art of Computer Programming” series, stated this viewpoint ...