.NET Micro Framework 3.0
Implements a TextWriter for writing characters to a stream in a particular encoding.
Assembly: mscorlib (in mscorlib.dll)
StreamWriter is designed for character output in a particular Encoding, whereas classes derived from Stream are designed for byte input and output. StreamWriter defaults to using an instance of UTF8Encoding unless specified otherwise. This instance of UTF8Encoding is constructed without a Byte-Order Mark (BOM), so its GetPreamble method returns an empty byte array. To create a StreamWriter using UTF-8 encoding and a BOM, consider using a constructor that specifies encoding, such as StreamWriter(String, Boolean, Encoding). By default, a StreamWriter is not thread safe. See TextWriter.Synchronized for a thread-safe wrapper.