In my C# Application, I have a byte array as follows.
byte[] byteArray = {0x2, 0x2, 0x6, 0x6};
I need to split the first two elements i.e 0x2 and 0x2 and assign it to a byte variable. Similarly last two elements should be assigned to another byte variable.
i.e
byte FirstByte = 0x22;
byte SecondByte = 0x66;
I can split the array into sub arrays but I am not able find a way to convert byteArray into a single byte.