Global goto labels | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Global goto labels

How can I declare a global goto label to do unconditional jumps between methods?

22nd Jun 2020, 1:46 AM
Darp5756
Darp5756 - avatar
1 Answer
0
As I understand it, labels are locally scoped (read: within functions/methods). Not sure what needs or why you want to use `goto` in a language like C#, while even in C or C++ they are not preferable except for rare occasions, and with extra care in writing, or else it can be quite messy.
25th Jun 2020, 8:44 AM
Ipang