Advertisement
mjc65

Example 1-74. goto statement with a label

Jun 23rd, 2020
780
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.10 KB | None | 0 0
  1. int x = 3;
  2. if ( x == 3) goto customLabel;
  3. x++;
  4.  
  5. customLabel:
  6. Console.WriteLine(x);
  7. // Displays 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement