title: File used by another process
body: <p>Many a times we get an error, while trying to write file on Windows platform, </p>
  
  <p>"The process cannot access the file 'XXX' because it is being used by another process." </p>
  
  <p>How to check in C#, before writing to file that its not being used by another process?</p>