private void EnsureCanSeek() { Debug.Assert(_stream != null); if (!_stream.CanSeek) throw new NotSupportedException(SR.NotSupported_UnseekableStream); }