public void DeleteBytes(long index, long length) { try { long num2; DataBlock nextBlock; long num = length; for (DataBlock block = this.GetDataBlock(index, out num2); (num > 0L) && (block != null); block = (num > 0L) ? nextBlock : null) { long num3 = block.Length; nextBlock = block.NextBlock; long count = Math.Min(num, num3 - (index - num2)); block.RemoveBytes(index - num2, count); if (block.Length == 0L) { this._dataMap.Remove(block); if (this._dataMap.FirstBlock == null) { this._dataMap.AddFirst(new MemoryDataBlock(new byte[0])); } } num -= count; num2 += block.Length; } } finally { this._totalLength -= length; this.OnLengthChanged(EventArgs.Empty); this.OnChanged(EventArgs.Empty); } }