public byte this[int index] { get { if (index >= Length) throw new IndexOutOfRangeException(); return memoryStream.GetBuffer()[index]; } }