I am trying to append the multiple files into single file using bytes array but when i try to append the file it converts only single file which is last one. i use below code:
byte[] outputBytes = new byte[0];
byte[] temp1 = System.IO.File.ReadAllBytes(@"D:\2.doc");
byte[] temp2 = System.IO.File.ReadAllBytes(@"D:\3.doc");
outputBytes = new byte[temp1.Length + temp2.Length];
Buffer.BlockCopy(temp1,0,outputBytes,0,temp1.Length * sizeof(byte));
Buffer.BlockCopy(temp2,0,outputBytes,0,temp2.Length * sizeof(byte));
System.IO.File.WriteAllBytes(@"D:\myOutPut.doc",outputBytes);
i am creating one output file in which all files content is display.
Thank You.