我正在尝试从另一个 wpf 应用程序调用一个 wpf 应用程序。调用 wpf 应用程序进行调用
ProcessStartInfo BOM = new ProcessStartInfo();
BOM.FileName = @"D:\WPFAPPLICATION.exe";
BOM.Arguments = temp;
Process.Start(BOM);
现在在调用的应用程序中,我尝试检索使用传递的参数
string arguments =Process.GetCurrentProcess().StartInfo.Arguments;
但是参数没有通过。为什么是这样??
我还尝试了另一种方法,其中:
public partial class App : Application
{
public static String[] mArgs;
private void Application_Startup(object sender, StartupEventArgs e)
{
if (e.Args.Length > 0)
{
mArgs = e.Args;
}
}
}
}
然而这也不起作用!!!请帮忙!!