摘要: #region 如何自定义异常 Console.WriteLine("请输入电脑价格(整数)----->"); try { int inputPCNum = Convert.ToInt32(Console.ReadLine()); PcPrice p... 阅读全文
posted @ 2019-07-22 22:06 超暖系呆少年i 阅读(477) 评论(0) 推荐(0) 编辑
摘要: public class Cow { internal void Num(int n ) { if(n<100) { throw new Exception("发生异常,Num方法的参数不能小于100"); } Console.WriteLine(" ok,你输入的值是{0} ",n); } } 阅读全文
posted @ 2019-07-22 21:47 超暖系呆少年i 阅读(298) 评论(0) 推荐(0) 编辑