Assume there is a string hexString = "0x12"
or "0x45"
etc. How can I convert the string to another byte[] as below. Thanks.
byte[] myByte = new byte[2];
myByte[0] = 0x1;
myByte[1] = 0x2;
or
myByte[0] = 0x4;
myByte[1] = 0x5;
When I try to concatenate the substring as below,
myByte[0] = '0x' + '4'; // Show compile error. It doesn't work.
I don't know how to fix it. thanks. etc.