//-Removing public void removeElementAt(int inIndex, bool inUseSwapRemove = false) { validateIndex(inIndex); int theLastIndex = getSize() - 1; if (inUseSwapRemove) { XUtils.swap(ref _elements[inIndex], ref _elements[theLastIndex]); } else { for (int theIndex = inIndex; theIndex < theLastIndex; ++theIndex) { _elements[theIndex] = _elements[theIndex + 1]; } } --_size; _validation_changesTracker.increaseChanges(); }
//-Implementation //--Utils private void normalizeState() { if (_state.Minimum > _state.Maximum) { XUtils.swap(ref _state.Minimum, ref _state.Maximum); } setValue(_state.Value); }