Code: Alles auswählen
Byte[] data = new Byte[2];
data[0] = 0x0b;
data[1] = 0x02;
int hmm = BitConverter.ToInt16(data,0); //0x0000020b
data = new Byte[4];
data[0] = 0x00;
data[1] = 0x01;
data[2] = 0x00;
data[3] = 0x00;
hmm = BitConverter.ToInt32(data, 0); //0x00000100
0x0b
0x02
0x0000020b BitConverter.ToInt16
0xf0
0x00
0x00
0x00
0x000000f0 BitConverter.ToInt32
0x0b
0x01
0x0000010b BitConverter.ToInt16
0x0b
0x02
0x0000020b BitConverter.ToInt16
0x00
0x01
0x00
0x00
0x00000100 BitConverter.ToInt32
danke und grüße