摘要:
//输入年月,不正确重新输入 for (; ; ) { Console.WriteLine("输入年份:"); int year = int.Parse(Console.ReadLine()); if (year >= 0 && year <= 9999) { Console.WriteLine(" 阅读全文
posted @ 2016-03-11 15:52
万里冰封
阅读(186)
评论(0)
推荐(0)
摘要:
//try//保护执行里面的代码段,若其中一句有错误,直接跳到catch执行 //{//不会管下面的内容 // int a = int.Parse(Console.ReadLine()); // Console.WriteLine("dui"); //} //catch//try中发现异常,直接执行 阅读全文
posted @ 2016-03-11 11:37
万里冰封
阅读(141)
评论(0)
推荐(0)

浙公网安备 33010602011771号