using System;
using System.IO;
public class Program
{
public static void Main()
var x = new MemoryStream(); x.Write(new byte[] { 1, 2, 3 });
var y = new MemoryStream(); y.Write(new byte[] { 4, 5, 6 });
x.Position = x.Length;
y.Position = 0;
y.CopyTo(x);
Console.WriteLine(BitConverter.ToString(x.ToArray()));
}