开发者

Can you execute another EXE file from within a C# console application?

Can you execute another EXE file from within a C#开发者_Go百科 console application?

  • Can you pass arguments?
  • Can you get the exit code back?


Like this:

        var proc = new Process();
        proc.StartInfo.FileName = "something.exe";
        proc.StartInfo.Arguments = "-v -s -a";
        proc.Start();
        proc.WaitForExit();
        var exitCode = proc.ExitCode;
        proc.Close();
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜