public override void SetLength(long value) { if (!CanWrite) throw new InvalidOperationException("Stream is not writeable"); BaseStream.SetLength(value); }