M
msnews.microsoft.com
Very simple goal ... to string format an int with commas.
I have
int x = 12000
If I use
x.ToString("N")
I get 12,000.00
So I tried x.ToString("0,0")
I get 12,000. That's great!
But then if x is 1, I get "01"
That's not good ;-(
Tried a bunch of other stuff ... but don't get the desired results ... .
What am I doing wrong?
I have
int x = 12000
If I use
x.ToString("N")
I get 12,000.00
So I tried x.ToString("0,0")
I get 12,000. That's great!
But then if x is 1, I get "01"
That's not good ;-(
Tried a bunch of other stuff ... but don't get the desired results ... .
What am I doing wrong?