title: How to Merge two memory streams containing PDF file's data into one
body: <p>I am trying to read two PDF files into two memory streams and then return a stream that will have both stream's data. But I don't seem to understand what's wrong with my code.</p>
  
  <p>Sample Code:</p>
  
  <pre><code>string file1Path = "Sampl1.pdf";
  string file2Path = "Sample2.pdf";
  MemoryStream stream1 = new MemoryStream(File.ReadAllBytes(file1Path));
  MemoryStream stream2 = new MemoryStream(File.ReadAllBytes(file2Path));
  stream1.Position = 0;
  stream1.Copyto(stream2);
  return stream2;   /*supposed to be containing data of both stream1 and stream2 but contains data of stream1 only*/  
  </code></pre>