M
Michael Howes
MSDN documentation for format strings seems ambiguous. It's says
things like "significant digits or number of decimal places" all over
the place. Well those two things are different.
How do I show a specific number of significant digits to the right of
the decimal place with a format string? NOT number of decimal places,
significant digits.
For example;
if I have the number .001
the format string "{0:N2}" shows 0.00 yet if you were showing two
significant digits shouldn't that number display as 0.001?
another example is a number like 0.00123 showing 2 significant digits
would show 0.0012
It seems the number 2 in the format string is the number of decimal
places not the number of significant figures.
How can I use a format string to do this?
In my application the user can set the number of significant digits they
want to see.
thanks
mike
things like "significant digits or number of decimal places" all over
the place. Well those two things are different.
How do I show a specific number of significant digits to the right of
the decimal place with a format string? NOT number of decimal places,
significant digits.
For example;
if I have the number .001
the format string "{0:N2}" shows 0.00 yet if you were showing two
significant digits shouldn't that number display as 0.001?
another example is a number like 0.00123 showing 2 significant digits
would show 0.0012
It seems the number 2 in the format string is the number of decimal
places not the number of significant figures.
How can I use a format string to do this?
In my application the user can set the number of significant digits they
want to see.
thanks
mike