public virtual void RemoveAt (int index) { if (readOnly) throw new HttpException (); version++; Control ctrl = controls [index]; // BUG should be count - index -1 Array.Copy (controls, index + 1, controls, index, count - index ); count--; owner.RemovedControl (ctrl); }