使用参数在C#中运行控制台应用程序

如何在C#中运行控制台应用程序,将参数传递给它,并以Unicode格式获取应用程序的结果? Console.WriteLine用于控制台应用程序.
重要的一点是在Console Application中编写Unicode.
样本来自MSDN

 // Start the child process.
 Process p = new Process();
 // Redirect the output stream of the child process.
 p.StartInfo.UseShellExecute = false;
 p.StartInfo.RedirectStandardOutput = true;
 p.StartInfo.FileName = "Write500Lines.exe";
 p.Start();
 // Do not wait for the child process to exit before
 // reading to the end of its redirected stream.
 // p.WaitForExit();
 // Read the output stream first and then wait.
 string output = p.StandardOutput.ReadToEnd();
 p.WaitForExit();
https://stackoverflow.com/questions/6511978/run-console-application-in-c-sharp-with-parameters

转载注明原文:使用参数在C#中运行控制台应用程序