C# 应用程序之间传值——原创
时间:2010-12-12 来源:瑞恩多芬
string path = @"C:\bison_client1.1\bison_client\bin\Debug\客户端.exe";
string x = "haha";//这里存放的是要传入应用程序B中的值
System.Diagnostics.Process.Start(path, x);//运行由path指定路径的应用程序B
二、在应用程序B中的Main函数中添加一个string类型的数组作为接收的参数
static void Main(string[] args)
{
MessageBox.Show(args[0].ToString());
}
运行结果:
相应的详细信息可以看看MSDN里System.Diagnostics.Process.Start()方法的详细内容。
相关阅读 更多 +
排行榜 更多 +