/// <inheritdoc/>
            public void Insert(TValue value, long index)
            {
                changed = true;
                var arr = GetArray(false);

                BaseArray.CopyTo(index, arr, index + 1, (count - index));
                ++count;
                arr[index] = value;
            }
            /// <inheritdoc/>
            public TValue RemoveAt(long index)
            {
                changed = true;
                var arr = GetArray(false);
                var val = arr[index];

                BaseArray.CopyTo(index + 1, arr, index, (count - index));
                --count;
                return(val);
            }
 protected virtual BigArray <TValue> GetArray(bool readOnly)
 {
     if (readOnly)
     {
         var newArray = new BigArray <TValue>(BaseArray.Length);
         BaseArray.CopyTo(0, newArray, 0, BaseArray.Length);
         return(newArray);
     }
     return(BaseArray);
 }