I’m creating a console app to process a file and then move it to a ‘processed’ folder. The main console app calls another app using Process.Start(). This secondary app actually does the work of bulk inserting data into a database. Once the bulk insert is complete, the main app will move the file to another folder and then move on to additional tasks.
In the main app, how do I prevent the code from continuing until the secondary app finishes? I really need to have the first process finish before moving on to the next step.
Thanks!
You can use the WaitForExit() Methode