title: Check if file is in use
body: <p>Hi guys I need some help. I'm trying to open a textfile on a servern from multiple clients at the same time so I'm not locking the file when reading from it. Like this:</p>
  
  <pre><code>new StreamReader(File.Open(logFilePath, 
                         FileMode.Open, 
                         FileAccess.Read, 
                         FileShare.ReadWrite))
  </code></pre>
  
  <p>Now I'm trying to check if this file is used by any of the clients (because I want to write something new to it), but since I'm not locking it when reading from it I don't know how to do this. I can't try to open and catch an exception because it will open.</p>