A float in a string with at least one digit after a period
3 answers
Is there a maximum limit on the number of digits?
Instead, you can use:
String.Format("{0:0.0#####}", floatVal)
You can expand #on what you want / consider reasonable. Following .the format 0specifier , indicates that the decimal place must always be displayed, and #indicates that it should be displayed if present.
+8