title: How to read standard output of my own application
body: <p>I have an application that must read it's own output that is written via</p>
  
  <pre><code>Console.WriteLine("blah blah");
  </code></pre>
  
  <p>I'm trying</p>
  
  <pre><code>Process p = Process.GetCurrentProcess();
  StreamReader input = p.StandardOutput;
  input.ReadLine();
  </code></pre>
  
  <p>But it doesn't work because of "InvalidOperationException" at the second line. It says something like "StandardOutput wasn't redirected, or the process has not been started yet" (translated)</p>
  
  <p>How can I read my own output ? Is there another way to do that ? And to be complete how to write my own input ?</p>
  
  <p>The application with the output is running already.</p>
  
  <p>I want to read it's output <strong>live in the same application</strong>. There is no 2nd app. Only one.</p>