The startIndex of the .ToInt32 methode is not handled correctly
Sample:
{ 0x0F, 0x00, 0x00, 0x00};
byte[] b = new byte[] { 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00};
byte[] c = new byte[] { 0x0A, 0x00, 0x0F, 0x00, 0x00, 0x00 };
int value1 = BitConverter.ToInt32(a,0);
int value2 = BitConverter.ToInt32(b,2);
int value3 = BitConverter.ToInt32(c,2);
Debug.Print(value1.ToString());
Debug.Print(value2.ToString());
Debug.Print(value3.ToString());
output:
15
15
655375
Should be 15, 15, 15
(Copy from “Feedback for NETMF and Gadgeteer Package 2014 R2 Beta 3” to start a new thread)