gpt4 book ai didi

C#启动程序

转载 作者:太空宇宙 更新时间:2023-11-03 17:22:49 26 4
gpt4 key购买 nike

我正在创建程序并使用 Visual Studio 保存:test.exe然后创建创建的程序:run.exe,代码:

using System.Diagnostics;

Process run = new Process();

run.StartInfo.FileName = "test.exe";

run.Start();

为什么这个程序不启动第一个程序(test.exe)?

最佳答案

可能是因为 test.exe 不在同一个文件夹 run.exe 中。默认情况下,Visual Studio 将编译后的可执行文件放在 bin/Debug 文件夹中。

关于C#启动程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2939555/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com