That is the best method. Other wise loss the StringBuilder and use something like following:
using (MemoryStream ms = new MemoryStream())
{
using (StreamWriter sw = new StreamWriter(ms, Encoding.Unicode)) {
{
sw.WriteLine("dirty world.");
}
//do somthing with ms
}