V
VMI
In the following code, how can I display the MessageBox once MyThread has
finished executing? updateFiles method copies 5 humongous files to the HDD
but for some reason, the MessageBox is displayed before updateFles has
finished executing.
This is the code:
MyThread = new Thread(new ThreadStart (updateFiles));
MyThread.Start();
MessageBox.Show("Program has ended");
private void updateFiles()
{
/* several File.Copy calls of five 400MB files */
}
Thanks.
finished executing? updateFiles method copies 5 humongous files to the HDD
but for some reason, the MessageBox is displayed before updateFles has
finished executing.
This is the code:
MyThread = new Thread(new ThreadStart (updateFiles));
MyThread.Start();
MessageBox.Show("Program has ended");
private void updateFiles()
{
/* several File.Copy calls of five 400MB files */
}
Thanks.