摘要:
关于异常,记录一些看到的和自己总结的for (int i = 0; i <= 2; i++){try{ int number = Convert.ToInt32("aa");}catch (Exception ex){throw new MyUserException(ex.Message); }}MyUserException是自定义的异常类,把异常信息记入到异常文本error.txtpublic class MyUserException : Exception { private string messageinfo = string.Empty; public 阅读全文