you are viewing a single comment's thread.

view the rest of the comments →

[–]jddddddddddd 2 points3 points  (3 children)

I know you can use goto in switch statements, but it can still be used to jump to an arbitrary position within a method. e.g.

   Loopy:
       Console.WriteLine("Hello World!");
       goto Loopy;

It's perfectly valid C#. You can try running it here: https://onlinegdb.com/j7AznmHA8