Or even easier than Sandeep's method:
public void WriteStringAsBinary(string path, string data)
{
byte[] bytes = Encoding.UTF8.GetBytes(data);
File.WriteAllBytes(path, bytes);
}
Though to be honest you will almost certainly get exactly the same result with this:
public void WriteStringAsBinary(string path, string data)
{
File.WriteAllText(path, data, Encoding.UTF8);
}