Okay, I have a text box for input, and from this text box I need to take the data and parse it out to bytes and send it to a controller card for processing. The input is temperature and should not be below 100 (this is not important right now). My main problem is I need byte[i] = string[i]; exactly. Not its byte value for the char that is represented. if string[i] = 2 I need byte[i] to = 2.

Here is the code I have so far. I get values but not what I want, and it overwrites my byte and only fills 1 array slot.

byte[] gen = new byte[5];
char[] holder = setpointBoxQS.Text.ToCharArray();
string[] conv = new string[holder.Length];

for (int i = 0; i < holder.Length; i++)
{
conv[i] = holder[i].ToString();
}

if (holder.Length > 2)
{
for (int i = 0; i <= holder.Length; i++)
{
gen = Encoding.UTF8.GetBytes(conv[i]);
}
}


Thanks for any help