Hi,
I want to concatenate 0x with a variable (dont know what type) to pass it in a byte array. the code below shows the original code :
ORIGINAL CODE :
ioData = new byte[256];
ioData[0] = (byte)0xAA;
the code below illustrates what i want to do....
DESIRED CODE :
ioData = new byte[256];
String strHEX = "FF";
ioData[0] = (byte)0x + strHEX;
This way i can pass any hex value to 0x. The problem is, i can't eliminate the error..... is there a way to achieve this? i'm sure there is right? I'll just need experts like you guys to figure it out and help me with this one... ^^ thanx in advance
Regards,
Jeff
I want to concatenate 0x with a variable (dont know what type) to pass it in a byte array. the code below shows the original code :
ORIGINAL CODE :
ioData = new byte[256];
ioData[0] = (byte)0xAA;
the code below illustrates what i want to do....
DESIRED CODE :
ioData = new byte[256];
String strHEX = "FF";
ioData[0] = (byte)0x + strHEX;
This way i can pass any hex value to 0x. The problem is, i can't eliminate the error..... is there a way to achieve this? i'm sure there is right? I'll just need experts like you guys to figure it out and help me with this one... ^^ thanx in advance
Regards,
Jeff
Comment