日期:2014-05-17 浏览次数:21159 次
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
Application.ThreadException += Application_ThreadException;
}
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
{
throw new NotImplementedException();
}
------解决方案--------------------
在需要try/catch时才用,比如读文件时,读数据库时,这样方便给客户显示出出错的原因。其它时间不需要。