How to format string add commas at thousand position?

  • Thread starter Thread starter Netmonster
  • Start date Start date
N

Netmonster

All,

How to format string add commas at thousands position, and hundred
thousands position

Example 1: I have string s = "1001"; or could be a random number I want
the output to be 1,001.

Example 2 : I have string s = "1000001"; or could be a random number I
want the output to be 1,000,001.



Thanks in advance

KC
 
All,

How to format string add commas at thousands position, and hundred
thousands position

Example 1: I have string s = "1001"; or could be a random number I want
the output to be 1,001.

Example 2 : I have string s = "1000001"; or could be a random number I
want the output to be 1,000,001.



Thanks in advance

KC
Look up string.Format in the documentation.

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
 
Back
Top