WPF程序接收启动参数并启动
新建一个WPF项目WpfApp1

创建一个新的启动类
public class NewApp
{
public static string[] Args = new string[] { };
[STAThread]
public static void Main(string[] args)
{
Args = args;
App app = new App();
app.InitializeComponent();
app.Run();
}
}
然后修改启动对象

接收启动参数

使用命令行进行启动

成功接受到启动参数


浙公网安备 33010602011771号