1.调用方
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 /调用exe文件的绝对路径 2 string FileName = @"路径"; 3 //调用exe文件接受的数组,其中以空格分开 4 string agrs = "参数组"; 5 //进程 6 Process myprocess = new Process(); 7 //启动进程的一组参数值 8 ProcessStartInfo startInfo = new ProcessStartInfo(FileName, agrs); 9 myprocess.StartInfo = startInfo; 10 myprocess.StartInfo.UseShellExecute = true; 11 myprocess.Start(); 12 //等待调用exe进程节结束 13 myprocess.WaitForExit();
2.被调用方
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 //用来接受传递的参数值并进行运算 2 string[] args = new string[]{}; 3 4 //构造函数接收参数 5 public Form1(string[] p) 6 { 7 InitializeComponent(); 8 args = p; 9 }