title: File deleting error
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/877889/the-process-cannot-access-the-file-because-it-is-being-used-by-another-process">The process cannot access the file because it is being used by another process</a>  </p>
  </blockquote>
  
  
  
  <p>I have a PDF file in my application i want to delete that file. when I try to delete the file it give the error "The process cannot access the file because it is being used by another process."</p>
  
  <p>The code is as follows</p>
  
  <pre><code>if (File.Exists(sDownloadFile))
               File.Delete(sDownloadFile);
  </code></pre>
  
  <p>How can I delete this file?</p>