using System;
using System.IO;
public class Program
{
public static void Main()
byte[] source = new byte[] { 0, 1, 2, 3 };
MemoryStream stream = new MemoryStream(source);
// If it's copied, the stream won't be affected.
source[0] = 10;
byte b = (byte)stream.ReadByte();
Console.WriteLine(b);
}