title: How to dispose File.OpenRead()
body: <p>How to I dispose the File.OpenRead() correctly. I am currently using the below code?</p>
  
  <pre><code>using (BinaryReader br = new BinaryReader(File.OpenRead(path)))
  {
     myByte = br.ReadByte();
  }
  </code></pre>
  
  <p>I get the following in Visual Studio when analyzing the code:</p>
  
  <blockquote>
    <p>Warning   1   CA2000 :
    Microsoft.Reliability : In method
    'Program.Main(string[])', object
    'File.OpenRead(path)' is not disposed
    along all exception paths. Call
    System.IDisposable.Dispose on object
    'File.OpenRead(path)' before all
    references to it are out of scope.</p>
  </blockquote>