//C# goto语句用法,跳转到某个执行步骤 public void Test() { //步骤1 B1: Console.WriteLine("执行步骤1功能"); //步骤3 B2: Console.WriteLine("执行步骤2功能"); //步骤3 B3: Console.WriteLine("执行步骤3功能"); //假如 执行此步骤时出异常,我们跳转到【步骤1】 则用 goto B1 goto B1; }
本文来自 www.luofenming.com
//C# goto语句用法,跳转到某个执行步骤 public void Test() { //步骤1 B1: Console.WriteLine("执行步骤1功能"); //步骤3 B2: Console.WriteLine("执行步骤2功能"); //步骤3 B3: Console.WriteLine("执行步骤3功能"); //假如 执行此步骤时出异常,我们跳转到【步骤1】 则用 goto B1 goto B1; }
本文来自 www.luofenming.com