Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flush should probably not throw NotSupportedException #771

Open
carlreinke opened this issue Sep 26, 2023 · 1 comment
Open

Flush should probably not throw NotSupportedException #771

carlreinke opened this issue Sep 26, 2023 · 1 comment

Comments

@carlreinke
Copy link

According to the Stream.Flush docs:

In a class derived from Stream that doesn't support writing, Flush is typically implemented as an empty method to ensure full compatibility with other Stream types since it's valid to flush a read-only stream.

public override void Flush() => throw new NotSupportedException();

@adamhathcock
Copy link
Owner

Good catch and good PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants