title: Reading console stream continually in c#
body: <p>I want to read a continues output stream of cmd in c#. I know that I can redirect the standard output stream and read it. Following is the code:</p>
  
  <pre><code>        System.Diagnostics.ProcessStartInfo pi= new System.Diagnostics.ProcessStartInfo(ProgramPATH,Params);
          pi.RedirectStandardOutput = true;
          pi.UseShellExecute = false;
          pi.CreateNoWindow = true;
  
          System.Diagnostics.Process proc= new System.Diagnostics.Process();
          proc.StartInfo = pi;
          proc.Start();
  
          string result = proc.StandardOutput.ReadToEnd();
  </code></pre>
  
  <p>But this gives the whole output at once. What if I issue <code>ping</code> command with <code>-t</code> argument? How I can read this stream continually?</p>