Double.ToString ("format") for netMF - argument exception

I had a problem with the format working correctly with double.ToString () in netMF4.3 . And also int.ToString("format")

I am looking to format a double with 3 leading zeros and no decimals. In this regard, any number of leading zeros. Here is my code.

 double myDouble = 23.2; string myString = myDouble.ToString("000"); // I've tried other formats // Expected Result : "023" 

An unhandled exception of type "System.ArgumentException" occurred in mscorlib.dll

I read the documentation here and here and here , but I get a System.ArgumentException when trying to format strings.

This code works in the emulator, but it does not work when deployed on a real device.

+4
source share

All Articles