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

Incorrect code: Chapter 1A - What's New in Modern C# and .NET -> Using declarations #16

Closed
gelverpl opened this issue Apr 4, 2024 · 1 comment

Comments

@gelverpl
Copy link

gelverpl commented Apr 4, 2024

It looks like there is a mistake in the second block of the code in this online section:
image

You probably forgot to remove the brackets and it should look like this:

using FileStream file = File.OpenWrite(Path.Combine(path, "file.txt"));
...
// automatically calls Dispose at the end of current scope if the file is not null
@markjprice
Copy link
Owner

Yes, thank you. Fixed now.

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

No branches or pull requests

2 participants