Load your text file into a single string, and then call this method:
public static byte[] StringToByteArray(string text)
{
UTF8Encoding encoding = new UTF8Encoding();
return encoding.GetBytes(text);
}
To put it back into a string, call this method:
public static string ByteArrayToString(byte[] array)
{
UTF8Encoding encoding = new UTF8Encoding();
string text = encoding.GetString(array);
return text;
}