I am currently calling a process which inports parameters from a text file,
Although when one line of the text file is read it works correctly, but the second line of the text file is executed straight after. Is there any way to tell Process.Start to wait until the previous command has finished?
static void Main(string[] args)
{
foreach (string exename in System.IO.File.ReadAllLines("test.txt"))
{
Process.Start("test.exe", "\"" + exename + "\"");
}
}
Documented at MSDN. I usually google “
MSDN [class/method/property]“. In this case you could have googled “msdn process class” and you would have found the method.