New here and very novice so pardon any terminology errors...
I have a string that represents (literally) a hex byte array that I need to convert to a byte array. for example string a = "8400081A" that I need to convert to a byte array of exactly the same {0x84, 0x00, 0x01, 0x1A}. (with or without the leading 0x) I found several answers that claim to do this, but they all seem to convert to this {132, 0, 8, 26}...
I'm completely stuck...thanks in advance
{132, 0, 8, 26}is the decimal equivalent of{0x84, 0x00, 0x01, 0x1A}.bytevalue does not have format assigned. It's just a value. How it's being displayed is up to either IDE (when you use debugger tools to peak the value during debugging) or use code, when it's transformed to string and shown to user.