2012年12月30日
摘要: 在我们的程序中,不可避免的会出现异常,那么就需要就异常进行处理,否则就会出现bug。下面将提到我经常使用的两种桌面程序对UnhandledException的处理。1、首先,在WinForm程序中,需要在program.cs中添加以下代码。static class Program{ /// /// 应用程序的主入口点。 /// [STAThread] static void Main() { try { //处理未捕获的异常 Application.SetUnhandledExceptionMode(Unhandle... 阅读全文
posted @ 2012-12-30 22:03 littlelemon 阅读(814) 评论(0) 推荐(0) 编辑