The specified character is written to the underlying stream unless the end of the stream is reached prematurely. If AutoFlush is true, Flush is invoked automatically.
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.