Essential Types C# Book

The following code writes to the file using unicode encoding.
using System;
using System.Text;
class Sample
{
public static void Main()
{
System.IO.File.WriteAllText("data.txt", "Testing...", Encoding.Unicode);
}
}