using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace _11.流程控制之goto语句{    class Program    {        static void Main(string[] args)        {            // goto语句用于控制代码何时执行。                        /**              * goto语句使用语法:             *  goto 
;             * goto语句标签名定义语法:             *  
:             */                         // 使用goto语句会导致程序流程混乱,代码不容易阅读。                        // 使用goto语句可能导致有些代码块无法执行。                        // 使用goto语句实现1+...+10累加功能。                        {                int i = 1, sum = 0;                            Loop:                sum += i;                i++;                if (i > 10)                    goto End;                goto Loop;            End:                Console.WriteLine("sum = {0}", sum);            }                        {                int myInteger = 5;                                goto myLabel;                myInteger += 10; // 此句代码无法执行            myLabel:                Console.WriteLine("myInteger = {0}", myInteger);            }                        Console.ReadKey();        }    }}