title: IOException unhandled - "Cannot access file because it is being used by another process"
body: <p>I am getting this error every time I try to read a file after it is being created. To follow the process:</p>
  
  <ul>
  <li><p>The file is created using</p>
  
  <pre><code>File.Create(filename);
  </code></pre></li>
  <li><p>I then attempt to read that file, using:</p>
  
  <pre><code>StreamReader rdr = new StreamReader(filename); //error catches here
  </code></pre>
  
  <p>I get the error:</p>
  
  <blockquote>
    <p>The process cannot access the file '(filename)' because it is being used by another process.</p>
  </blockquote></li>
  </ul>
  
  <p>Is this occurring because I haven't closed the file after creating it? How do I do that? Does <code>File.Close(fileName);</code> work?</p>