title: Reading/Writing to a command line program in c#
body: <p>I'm trying to talk to a command-line program from C#. It is a sentiment analyser. It works like this:</p>
  
  <p><code>CMD&gt; java -jar analyser.jar</code></p>
  
  <p><code>&gt;Starting analyser...</code></p>
  
  <p>{This is where I want to insert things from my c# program. For example:}</p>
  
  <p><code>I love you!</code></p>
  
  <p>{And the program responds - I want to read this}</p>
  
  <p><code>Very Positive</code></p>
  
  <p>Here's some pseudo code:</p>
  
  <pre><code>Process.start("sentiment.exe");
  Process.writeline("I love you");
  string Response = Process.readline();
  </code></pre>
  
  <p>What methods does C# offer for writing to a process's standard input and reading from a its standard output?</p>