摘要: 关于异常,记录一些看到的和自己总结的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 阅读全文
posted @ 2012-05-24 10:32 蹦极的馒头 阅读(676) 评论(0) 推荐(1) 编辑