public static void Main() { float testNumber = 5.25f; byte[] numberBytes = GetBytes(testNumber); for (int count = 0; count < numberBytes.Length; count++) { Debug.Print("Byte[" + count + "]=" + numberBytes[count]); } } public static unsafe byte[] GetBytes(float value) { byte* pointerToFirstByte = (byte*)&value; byte[] resultBytes = new byte[4] { *pointerToFirstByte, *(pointerToFirstByte + 1), *(pointerToFirstByte + 2), *(pointerToFirstByte + 3) }; return resultBytes; }
the Netduino ends up locked and I have to erase it with MFDeploy. Is there any way to use pointers in the Netduino Plus?