i'v searched already the forum and got multiple answers but none what i can find answer my problem...
i have the string : "48FF0015E8" and i need to convert it to a byte array like byte[]{48,FF,00,15,E8}, just the same as the string, not converted to something else...
using byte bt = Convert.ToByte("E8", 16) do the job but will fail in Convert.ToByte("48", 16) as it store "72" in the array
i need to loop the string in blocks of 2 chars(1 byte) since i need to make some comparisons and then store in byte array.
for(int x = 0;x<numBytes;x+=2)
{
string strByte = HexStr.Substring(x, 2) //Loop bytes from string "48FF0015E8"
byte bt = Convert.ToByte(strByte, 16); // here is where i have problems
offset += 2;
}