It looks like there is a mistake in the second block of the code in this online section:
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
It looks like there is a mistake in the second block of the code in this online section:
You probably forgot to remove the brackets and it should look like this: