Format integer number with . as thousand separator and no decimals

677 views Asked by At

I want to print a number with no decimals and a . as the thousand separator. All the example I could Google have a , as a thousands separator.

I've set the CultureInfo to "nl-NL"

So 3200 should be shown as 3.200

I tried:

"3200".ToString("N2")  
"3200".ToString("#.###")
"3200".ToString("0:0")
1

There are 1 answers

0
Daniel Stackenland On BEST ANSWER

If you use "nl-NL" then N0 should do it, try this:

    decimal num = 3200;
    num.ToString("N0");