public void Reserve(int capacity) { if (bytes == null || bytes.Length < capacity) { byte[] newArray = new byte[capacity]; if (bytes != null) { System.Array.Copy(bytes, 0, newArray, 0, bytes.Length); } bytes = newArray; } }