how to convert number 135 to 135.00 ??

wondery

Freshman
Joined
Sep 12, 2003
Messages
43
my code is

C#:
double Fee = Convert.ToDouble(dv3[0].Row[9].ToString());
			lblFeeRate.Text = Fee.ToString();
			double Rate = Convert.ToDouble(dv3[0].Row[10].ToString());
			lblItem.Text = Rate.ToString();
			double TRate = Convert.ToDouble(Fee*Rate);

it retrun 135 and i want 135.00 how to ?

thank for advance
 
Last edited:
i do

C#:
double TRate = Convert.ToDouble((Fee*Rate).ToString("###,###,##0.00"));

right ? it return 135 same above
 
You can also use ToString("n2"). Increase the 2 if you want more/less decimals. Use ToString("f2") if you want the 2 decimals but no commas.

-Nerseus
 
Back
Top