I am using multiple thread in wpf windows.
I am using this.Close() to close the window, and open another window using newWindow.Show().
Code:
// open new windows newWindow newWindow = new newWindow(); this.Close(); newWindow.Show(); // close window private void OnClosed(object sender, EventArgs e) { // stop some events d.StopEvents(); } It will takes long time to reach StopEvents.
If I use Environment.Exit(0); it will close the application, I don't want that.
Thanks.
List<Thread>and callingAborton them?Abortunless you have no other choice as without very careful usage you may as well consider the method to be called,PleaseCorruptMyApplicationStateRandomly