Closes the current writer and releases any system resources associated with the writer.
[Visual Basic] Overrides Public Sub Close() [C#] public override void Close(); [C++] public: override void Close(); [JScript] public override function Close();
You must call Close to ensure that all data is correctly written out to the underlying stream. Following a call to Close, any operations on the writer may raise exceptions.
StreamWriter Class | StreamWriter Members | System.IO Namespace