Hi Guru's,
Please help.
I have a text box containing some numbers. I need to turn these (Hex) numbers into a byte array to ship out of a com port.
Text box contains - 50750F
so my byte array b() needs to contain
50,75,0F
Dim b() As Byte
x = UIDField3.Text.SubString2(0,2)
strtemp= x & ","
x = UIDField3.Text.SubString2(2,4)
strtemp= strtemp & x & ","
x = UIDField3.Text.SubString2(4,6)
strtemp= strtemp & x & ","
' So at this point my string is "50,75,0F"
Dim bc As ByteConverter
b()=bc.StringToBytes(strtemp,1)
Am I on the wrong track here ?
Thanks in advance.
Please help.
I have a text box containing some numbers. I need to turn these (Hex) numbers into a byte array to ship out of a com port.
Text box contains - 50750F
so my byte array b() needs to contain
50,75,0F
Dim b() As Byte
x = UIDField3.Text.SubString2(0,2)
strtemp= x & ","
x = UIDField3.Text.SubString2(2,4)
strtemp= strtemp & x & ","
x = UIDField3.Text.SubString2(4,6)
strtemp= strtemp & x & ","
' So at this point my string is "50,75,0F"
Dim bc As ByteConverter
b()=bc.StringToBytes(strtemp,1)
Am I on the wrong track here ?
Thanks in advance.