I have to create my own byte array e.g:
byte[] connect = new byte[] { 0x00, 0x21, 0x60, 0x1F, 0xA1, 0x07 };
This byte array works fine, but I need to change some hex code. I tried to do a lot of changes but no one work.
Int32 hex = 0xA1;
byte[] connect = new byte[] { 0x00, 0x21, 0x60, 0x1F, 0xA1, hex};
string hex = "0xA1";
byte[] connect = new byte[] { 0x00, 0x21, 0x60, 0x1F, 0xA1, hex};
byte[] array = new byte[1];
array[0] = 0xA1;
byte[] connect = new byte[] { 0x00, 0x21, 0x60, 0x1F, 0xA1, array[0]};
I don't know what type of variable I must have to use to replace automatic the array values.