Why won't streamreader read the standard error stream?
<p>So, I got a piece of advice on debugging my code, but my attempt to debug has sprouted up more errors. I have all the correct usings, but here's my issue:</p>

<pre><code>Process p = new Process();
p.StartInfo.FileName = "javac";
Directory.CreateDirectory(System.IO.Path.Combine(Application.StartupPath + @"\TempJavaalfgwaepfgawe"));
p.StartInfo.Arguments = "-d " + System.IO.Path.Combine(Application.StartupPath + @"\TempJavaalfgwaepfgawe") + " " + files;
p.Start();

p.WaitForExit();
StreamReader sr = new StreamReader(p.StandardError);
MessageBox.Show(sr.ReadToEnd());
</code></pre>

<p>Anyhow, the error stems from when I declare the streamreader:</p>

<pre><code>StreamReader sr = new StreamReader(p.StandardError);
</code></pre>

<p>I get the following two errors:</p>

<pre><code>The best overloaded method match for 'System.IO.StreamReader.StreamReader(string)' has some invalid arguments

Argument 1: cannot convert from 'System.IO.StreamReader' to 'string'
</code></pre>
