What I am trying to do is place 4 bytes that are currently in an array into a single byte variable. For example:
public myMethod()
{
byte[] data = {(byte) 0x03, (byte) 0x4C, (byte) 0xD6, (byte) 0x00 };
writeData(testMethod((byte)0x4C, data));
}
public byte[] testMethod(byte location, byte[] data)
{
byte[] response = {(byte) 0x00, (byte) 0x21, location, data);
return response;
}
This obviously dose not work because you cannot cast byte to byte[].
Any ideas?
EDIT: There is some confusion as to what I am asking. What I am looking for is
data = (byte) 0x034CD600;
In the "testMethod".