G***G 发帖数: 16778 | 1 wpf c#
after closing the window, some files need to be saved.
what would happen if I put 'saving file' inside the window_close_event?
void Window_Closing(object sender, CancelEventArgs e)
{
for (int i=0;i<10000; i++)
{
sw.writeline(i);
}
sw.close();
}
I checked the output and found that some lines were missing. for example:
0
1
2
4 //3 is missing
5
6
7
Why did this happen? |
|