Process p = new Process();
p.StartInfo.FileName = @"";//控制台程序的路径
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardInput = true;
p.Start();
p.StandardInput.WriteLine("");
p.StandardOutput.ReadLine();