摘要:
#region 如何自定义异常 Console.WriteLine("请输入电脑价格(整数)----->"); try { int inputPCNum = Convert.ToInt32(Console.ReadLine()); PcPrice p... 阅读全文
摘要:
public class Cow { internal void Num(int n ) { if(n<100) { throw new Exception("发生异常,Num方法的参数不能小于100"); } Console.WriteLine(" ok,你输入的值是{0} ",n); } } 阅读全文