(50分)通过Process打开notepad.exe后,如何向记事本中写入信息呢?
通过Process打开notepad.exe后,如何向记事本中写入信息呢?
代码如下:
Process p = new Process();
p.StartInfo.FileName = "notepad.exe";
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput=true;
p.StartInfo.RedirectStandardError=true;
p.StartInfo.UseShellExecute = false;
p.Start();
p.StandardInput.WriteLine(" 计算结果如下:");
但打开的记事本中为空,没有想写入的字符,请问该如何实现改功能?