Will Gilbert
Member
- Joined
- Dec 1, 2020
- Messages
- 6
- Programming Experience
- 5-10
I have following code:
Problem is that the MessageBox displays right away, and does not wait for loop to finish
How do I ensure Loop Finished BEFORE displaying messagebox
C#:
for (int i = 0; i < MyCount; i++)
{
// Do stuff which can take from 10 to 300 seconds
}
Messagebox.Show("Finished Loop");
How do I ensure Loop Finished BEFORE displaying messagebox
Last edited by a moderator: