My string contains the bytes (e.g 0x27), basically what I need to do is convert that string array which contains the byte data to a byte data type, so then I can encode it in UTF8, so it displays meaningful info.
1 string array contains:
0x37, 0x32, 0x2d, 0x38, 0x33, 0x39, 0x37, 0x32,0x2d, 0x30, 0x31
I need that converted to a byte array, is that possible?
My code is:
string strData;
string strRaw;
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.InnerXml = Data;
XmlElement xmlDocElement = xmlDoc.DocumentElement;
strData = xmlDocElement.GetAttribute("datalabel").ToString();
strRaw = xmlDocElement.GetAttribute("rawdata").ToString();
string[] arrData = strData.Split(' ');
string[] arrRaw = strRaw.Split(' ');
Thanks for any help.