The specified String is written to the underlying stream unless the end of the stream is reached prematurely.
Flush is invoked automatically if AutoFlush is true. If value is null, no entries are written.
Silverlight for Windows Phone
StreamWriter.Write may throw IndexOutOfRangeException if the stream state becomes corrupted. On Silverlight for Windows Phone, the stream state may become corrupted if multiple threads write to or read from a stream object without using synchronization.