title: Keeping 2 filepointers for a file in C# as index to file content
body: <p>We create Fstream1 which opens the file and stores the start of file.
  Now we copy the fstream1 to fstream2. </p>
  
  <p>Note: <code>fstream1</code> will read file upwards whereas fstream2 will read file downwards.</p>
  
  <p>Before reading a chunk of data upwards or downwards the respective <code>fstream*</code> has to remember the initial start position.</p>
  
  <p>Problem is when we read the position of both the fstream’s is moving leading to loss of the position intended to store.</p>
  
  <p>Example: Consider initial <code>fstream1.pos = 500</code> &amp; <code>fstream2.pos =500</code>. Now if I read upwards 200 characters the <code>fstream1.pos=300</code> but <code>fstream2.pos</code> should remain 500, in our case the <code>fstream2.pos</code> also becomes 300. 
  Similarly if I read downwards.</p>
  
  <pre><code>fileStream1 = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 1, true);
  fileStream2 = filestream1; // want this but without opening the file again
  </code></pre>
  
  <p>considering <code>filestream</code> would be like <code>filepointers</code> in C++.
  Note: above task is in C#.</p>