NumberFormatInfo nfi = (NumberFormatInfo)CultureInfo.InvariantCulture.NumberFormat.Clone();
nfi.NumberGroupSeparator = ",";
Console.WriteLine(12345.ToString("n", nfi)); // 12,345.00
for my surprise it includes the decimal poiont at last. it made my job easy....:-)
thanks to author @ http://stackoverflow.com/questions/752145/use-a-custom-thousand-separator-in-c-sharp
No comments:
Post a Comment