How to Merge two memory streams containing PDF file's data into one
问题 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. Sample 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