title: System.IO.FileStream FileAccess vs FileShare
body: <p>I've searched all over but can't find an answer to this question.  I understand that <a href="http://msdn.microsoft.com/query/dev11.query?appId=Dev11IDEF1&amp;l=EN-US&amp;k=k(System.IO.FileAccess);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.5);k(DevLang-csharp)&amp;rd=true" rel="noreferrer">FileAccess</a> deals with file access on the machine and <a href="http://msdn.microsoft.com/query/dev11.query?appId=Dev11IDEF1&amp;l=EN-US&amp;k=k(System.IO.FileShare);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.5);k(DevLang-csharp)&amp;rd=true" rel="noreferrer">FileShare</a> deals with the share, but I can't find an explanation of how exactly it comes together and how they impact one another.</p>
  
  <p>For example, if I have</p>
  
  <pre><code>using ( FileStream fs = new FileStream( pathName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite) )
  </code></pre>
  
  <p>does that mean that users on the machine can only read the file whilst users remotely accessing the folder can read and write to the file?  Additionally, what would the impact be in using</p>
  
  <pre><code>using ( FileStream fs = new FileStream( pathName, FileMode.Open, FileAccess.Read ) )
  </code></pre>
  
  <p>Where I haven't specified the FileShare?</p>