This way I would have to specify the precision in the formatstring. If
I wanted to dynamically adjust the precision I would always have to
build a "0.000000" string with the amount of "0"s representing the
precision I want. I find that somewhat odd and it cutters the code. Is
there another, more convienient way to achieve the desired effect.
Maybe something like
string.Format("{0:8E+0}",20000); // doesn't work, but is there a
similar syntax ?
Christof Nordiek schrieb:
you can use the following:
string.Format("{0:0.00000000E+0}",20000);
hth
"Robert Ludig" <sc******************@gmx.deschrieb im Newsbeitrag
news:11**********************@i3g2000cwc.googlegro ups.com...
When I format a number to a string in scientific notation:
string.Format("{0:E}",20000);
I get the following string (culture de-DE):
2,000000E+003
How can I format scientific notation in a way that no leading 00 are
inserted for the exponent, so the above would look like this:
2,000000E+3