At this point most people will be thinking \"Ah ill post this..:\"
byte[] dataB= System.Text.Encoding.ASCII.GetBytes(data);
However.. the p
//convert a string to a byte array
public static byte[] StrToByteArray(string str)
{
System.Text.UTF8Encoding encoding=new System.Text.UTF8Encoding();
return encoding.GetBytes(str);
}
//convert a byte array to a string
public string ByteArrayToStr(byte [] dBytes)
{
System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
return enc.GetString(dBytes);
}