PDA

Click to See Complete Forum and Search --> : C# Numeric problem


fifo
Jan 31st, 2007, 03:50 AM
Hi, Experts

I have a single number A = 1.9E+28, I want convert it to String by using

String B = A.ToString() ;

B will be "1.9E+28"

BUT I want to show B like B = "19000000....000" <---- 27 digit 0.

How can I do? Show me.

jmcilhinney
Jan 31st, 2007, 05:11 AM
String B = A.ToString("f0");"f0" means fixed-point with zero decimal places. Look up format strings on MSDN for more info.

fifo
Jan 31st, 2007, 07:40 PM
Nice, thanks