I know this might seem silly, but why does the following code only work if I Close() the file? If I don\'t close the file, the entire stream is not written.
Steps:
Because the C# designers were cloning Java and not C++ despite the name.
In my opinion they really missed the boat. C++ style destruction on scope exit would have been so much better.
It wouldn't even have to release the memory to be better, just automatically run the finalizer or the IDisposable method.