private void ThrowIfCantRead() { if (!CanRead) throw new NotSupportedException(SR.ReadingNotSupported); } private void ThrowIfCantWrite()