internal int CheckIndex(int i) { if ((i < 0) || (i >= limit)) throw new IndexOutOfRangeException(); return i; }