开发者

how start many process(own program) when process is singleton in C#

i have loop and in loop my program spawn new process and new process is singleton so other process cant start

foreach (var i in files)
{
    System.Diagnostics.P开发者_如何学JAVArocess.Start("c:\\Telock\\Telock.exe", " -S" + i.ToString());

}

how start 2 after 1 finish and ...


Why don't you look up Process class in MSDN (after all, you ARE using it)? If you had done that, you would have found the WaitForExit method.

foreach (var filename in files)
{
    Process.Start("c:\\Telock\\Telock.exe", " -S" + filename.ToString()).WaitForExit();
}

Take for habit to use more descriptive variable names (i doesn't really say anything, especially not for a filename).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜