title: Is there any way to read data from a locked file?
body: <p>Here's what I have in mind:</p>
  
  <pre><code>        var file = @"myfile";
          File.Open(file,
                    FileMode.Open, FileAccess.ReadWrite, FileShare.None);
  
          using (StreamReader rdr = new StreamReader(File.Open(file, FileMode.Open, FileAccess.Read, FileShare.Read)))
          {
              rdr.ReadToEnd();
          }
          var t = File.ReadAllBytes(file);
  </code></pre>
  
  <p>Neigther <code>File.Open(file, FileMode.Open, FileAccess.Read, FileShare.Read)</code> nor <code>File.ReadAllBytes</code> can read file data.</p>
  
  <p>From my old c++ and winapi days, I do remember, that there used to be a good way to read  locked files, if you have backup priviledges, but I have no idea how obtain and use those in c#.</p>
  
  <p>Can anyone provide me with a sample on how to read a file after it has been locked?</p>