Possible Duplicate:
.NET String.Format() to add commas in thousands place for a number
i have a double value that i want to add it thousand separator, with below conditions :
1- remove zero decimals after dor(.)
2-control count of decimals
for example :
string str_Money = Convert.ToDouble(Money).ToString("N3");
this code for Money = 50000 returns 50,000.000, but i don't want zero decimals(mean i want 50,000)
another example : for Money = 50000.2355 returns 50,000.235 and that is exactly what i want
how can i reformat it?