N
ngn
How do you format the number of decimal places in a
floating point number converted to a string?
I simply use the ToString() method on the float variable,
but I cannot find how to format it a #.## format (only 2
places of decimal).
float n = 0.12348528f
string str = n.ToString();
// ??? How do I now format str ???
floating point number converted to a string?
I simply use the ToString() method on the float variable,
but I cannot find how to format it a #.## format (only 2
places of decimal).
float n = 0.12348528f
string str = n.ToString();
// ??? How do I now format str ???