System.Windows.Forms.MemoryDataBlock.RemoveBytes C# (CSharp) Method

RemoveBytes() public method

public RemoveBytes ( long position, long count ) : void
position long
count long
return void
        public override void RemoveBytes(long position, long count)
        {
            byte[] newData = new byte[_data.LongLength - count];

            if (position > 0)
            {
                Array.Copy(_data, 0, newData, 0, position);
            }
            if (position + count < _data.LongLength)
            {
                Array.Copy(_data, position + count, newData, position, newData.LongLength - position);
            }

            _data = newData;
        }