Hi,
you can use this method:
private byte[] StringToByteArray(string str)
{
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
return enc.GetBytes(str);
}
and in e.g. a button click event you can do:
byte[] arr = StringToByteArray("Hello");
Please also see Hiren Solanki's answer for more information.