formatting - Add comma thousand separator to decimal (.net) -


I have a decimal number, say 1234.500.

I have to display it 1,234.4

string. Format ("{0: 0,0}", 1234.500) removes decimal place, and other formatting

You have custom formatting like #, ## 0.00

  string s = string.Format ("{0: #, ## 0.00}", xx Should use;   

1,234.50 will create, when xx = 1234.5M = double will be forgotten about converting Actually will not help. / P>


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -