Any difference between File.ReadAllText() and using a StreamReader to read file contents?
<p>at first i used a <code>StreamReader</code> to read text from a file</p>

<pre><code>StreamReader reader = new StreamReader(dialog.OpenFile());
txtEditor.Text = reader.ReadToEnd();
</code></pre>

<p>but found out about <code>File.ReadAllText</code> which seem to simplify my code to 1 line. but i wonder if there are any differences between the 2? or when should i use 1 over the other?</p>

<pre><code>txtEditor.Text = File.ReadAllText(dialog.FileName);
</code></pre>
