//C++ TO C# CONVERTER TODO TASK: The original C++ template specifier was replaced with a C# generic specifier, which may not produce the same behavior:
//ORIGINAL LINE: template<class InputIterator>
        public FileMappedVector <T> .iterator insert <InputIterator>(const_iterator position, InputIterator first, InputIterator last)
        {
            Debug.Assert(isOpened());

            ulong newSize     = size() + (ulong)std::distance(first, last);
            ulong newCapacity = new ulong();

            if (newSize > capacity())
            {
//C++ TO C# CONVERTER TODO TASK: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created:
//ORIGINAL LINE: newCapacity = nextCapacity();
                newCapacity.CopyFrom(nextCapacity());
                if (newSize > newCapacity)
                {
//C++ TO C# CONVERTER TODO TASK: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created:
//ORIGINAL LINE: newCapacity = newSize;
                    newCapacity.CopyFrom(newSize);
                }
            }
            else
            {
//C++ TO C# CONVERTER TODO TASK: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created:
//ORIGINAL LINE: newCapacity = capacity();
                newCapacity.CopyFrom(capacity());
            }

            //C++ TO C# CONVERTER TODO TASK: The typedef 'value_type' was defined in multiple preprocessor conditionals and cannot be replaced in-line:
//C++ TO C# CONVERTER TODO TASK: Only lambda expressions having all locals passed by reference can be converted to C#:
//ORIGINAL LINE: atomicUpdate(newSize, newCapacity, prefixSize(), suffixSize(), [this, position, first, last](value_type* target)
            atomicUpdate(new ulong(newSize), new ulong(newCapacity), prefixSize(), suffixSize(), (value_type target) =>
            {
                std::copy(cbegin(), position, target);
                std::copy(first, last, target + position.index());
                std::copy(position, cend(), target + position.index() + std::distance(first, last));
            });

            return(new iterator(this, position.index()));
        }
        public FileMappedVector <T> .iterator erase(const_iterator first, const_iterator last)
        {
            Debug.Assert(isOpened());

            ulong newSize = size() - std::distance(first, last);

            //C++ TO C# CONVERTER TODO TASK: The typedef 'value_type' was defined in multiple preprocessor conditionals and cannot be replaced in-line:
//C++ TO C# CONVERTER TODO TASK: Only lambda expressions having all locals passed by reference can be converted to C#:
//ORIGINAL LINE: atomicUpdate(newSize, capacity(), prefixSize(), suffixSize(), [this, first, last](value_type* target)
            atomicUpdate(new ulong(newSize), capacity(), prefixSize(), suffixSize(), (value_type target) =>
            {
                std::copy(cbegin(), first, target);
                std::copy(last, cend(), target + std::distance(cbegin(), first));
            });

            return(new iterator(this, first.index()));
        }