CSharp examples for Language Basics:goto
Demonstrate the use of the goto statement
using System;/*from w ww .j a v a2 s.c o m*/ public class GotoTest { public static void Main( ) { Console.WriteLine("about to goto label1"); goto label1; Console.WriteLine("This will not print"); label1: Console.WriteLine("label1 goto effective"); } }