Application.Exit() not exiting!
Date: 08/18/09
(C Sharp) Keywords: no keywords
I have the following:
if (userDlg.ShowDialog(this) == DialogResult.Cancel)
{
Application.Exit();
}
But when I run the code, the application is not exiting when I click the cancel button on the userDlg dialog. Stepping through in the debugger it's hitting the Application.Exit(); line ok, but just carrying on!
So how can I get the program to terminate (neatly!) at this point?
Thanks in advance,
Tim
Source: http://csharp.livejournal.com/104596.html