title: Stream Reader process cannot access file because its in use by another process
body: <p>My application parses log files but when trying to parse the current day's file I get an error stating that the file is being used by another process.  This log file is currently being written to and can be accessed through notepad but not through my application.</p>
  
  <p>Current Code:</p>
  
  <pre><code>Stream stream = new FileStream(fileToRead, FileMode.Open, FileAccess.Read);
  StreamReader sr = new StreamReader(stream);
  </code></pre>
  
  <p>Also tried this but had no luck:</p>
  
  <pre><code>Stream stream = new FileStream(fileToRead, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
  </code></pre>
  
  <p>What changes need to be to my code in order to READ a file that is being used by another process.  Copying the log file is not a solution due to the size of the log and performance of my application </p>