title: How to read byte[] with current encoding using streamreader
body: <p>I would like to read <code>byte[]</code> using C# with the current encoding of the file.</p>
  
  <p>As written in MSDN the default encoding will be UTF-8 when the constructor has no encoding:</p>
  
  <pre><code>var reader = new StreamReader(new MemoryStream(data)).
  </code></pre>
  
  <p>I have also tried this, but still get the file as UTF-8:</p>
  
  <pre><code>var reader = new StreamReader(new MemoryStream(data),true)
  </code></pre>
  
  <p>I need to read the <code>byte[]</code> with the current encoding.</p>