Possible Duplicate:
Double.ToString with N Number of Decimal Places
I want to show a decimal to 6 decimal places, even if it contains 6 x 0's For example:
3.000000
5.100000
3.456789
and so forth, is this possible?
Possible Duplicate:
Double.ToString with N Number of Decimal Places
I want to show a decimal to 6 decimal places, even if it contains 6 x 0's For example:
3.000000
5.100000
3.456789
and so forth, is this possible?
Use N6
as the numeric format string.
myDecimal.ToString("N6");
or
string.Format("{0:N6}", myDecimal);