青春几米光

点击这里给我发消息

导航

2013年7月16日 #

break,continue,return 区别

摘要: using System;using System.Collections.Generic;using System.Text;namespace breakcontinue_test{ class Program { static void Main(string[] args) { for (int i = 10; i > 3; i--) //判断变量是否大于3,如果满足条件,开始循环 { Console.WriteLine("当前变量的值等于{0}", i); //输出变量值 break; //跳出整个for循环 return 的作用跟break一样。 Cons 阅读全文

posted @ 2013-07-16 10:40 青春几米光 阅读(319) 评论(0) 推荐(0) 编辑