Display a number with both comma seperators and NO decimal places?
Posted on 2006-06-14
I've a double such as '34567', and I need to display this as label text as '34,567'. Note that I do not want to display any decimal places.
I have managed to get the comma delimiters inserted by using:
NumberFormatInfo nfi = new CultureInfo( "en-US", true ).NumberFormat;
double GIA = 34567;
Label10.Text = GIA.ToString("N", nfi);
result = 34,567.00 <--NOTE that the result includes decimal places!
So the question once more is, how can I get both the comma delimiters AND no decimal places?
Thanks for your help.