文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>C#数据基础-跳转语句

C#数据基础-跳转语句

时间:2010-11-24  来源:夜曲的成长日记

2、goto的用法:强制跳转 常用语汇编语言

    01     goto lable

    02     Console.WriteLine(“goto跳过去的一行”);

    03  lable:

            Console.WriteLine(“跳这里了!”);

3、break用法:break必须存在于switch,while,do,fo/foreach中

4、continue用法:continue的用法和break的用法有点区别 容易弄混

    例子:

continue试验namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            for (int i = 1; i < 10; i++)
            {
                if (i < 5)
                {
                    continue;
                }
                Console.WriteLine(i);
            }
            Console.Read();
        }
    }
}

相关阅读 更多 +
排行榜 更多 +
杖剑传说切换技能方案指南

杖剑传说切换技能方案指南

冒险解谜 下载
都市毁灭模拟器

都市毁灭模拟器

音乐节奏 下载
神探诡事录器门位置一览

神探诡事录器门位置一览

冒险解谜 下载