public override void WriteToStream(System.IO.Stream stream)
{
byte[] buffer=Encoding.Unicode.GetBytes(this.Text);
stream.WriteByte(0xff); // first byte of BOM
stream.WriteByte(0xfe); // second byte of BOM
stream.Write(buffer, 0, buffer.Length); // char data
stream.WriteByte(0); // null terminator
stream.WriteByte(0); // null terminator
}