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 the constructor made a copy, the stream won't be affected and it will output 0 below.
source[0] = 10;
byte b = (byte)stream.ReadByte();
Console.WriteLine(b);
}