我在调试程序的时候总是会自动退出,每次都使用了SqlDataAdapter.fill()或者update后就会跳到一个地方,这个地方是
protected override void Dispose(bool disposing){
if(disposint && (components!=null)){
compnents.Dispose();
}
base.Dispose(disposing)
}每次都先跳到主界面的这个位置,然后会跳到当前窗口的同样上面方法的位置,然后程序就自动退出了,没有任何错误提示,现在很着急啊,那位高手大概知道问题出在哪里吗?先谢谢了
protected override void Dispose(bool disposing){
if(disposint && (components!=null)){
compnents.Dispose();
}
base.Dispose(disposing)
}每次都先跳到主界面的这个位置,然后会跳到当前窗口的同样上面方法的位置,然后程序就自动退出了,没有任何错误提示,现在很着急啊,那位高手大概知道问题出在哪里吗?先谢谢了
static Program()
{
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
} static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
string strException = string.Format("{0}发生系统异常。\r\n{1}\r\n\r\n\r\n", DateTime.Now, e.ExceptionObject.ToString());
File.AppendAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SystemException.log"), strException);
}
{
//异常代码
}
catch(Exception ex)
{
Messagebox.Show(ex.Message);
}