format number in C# -


possible duplicate:
.net string.format() add commas in thousands place number

how format number 1234567 1,234,567 in c#?

for format options int32.tostring(), see here or here.

for example:

string s = myintvalue.tostring("#,##0"); 

the same format options can use in string.format, in

string s = string.format("the number {0:#,##0}!", myintvalue); 

Comments

Popular posts from this blog

delphi - TJvHidDeviceController "DevicePath" always showing "\" -

Disabling Android home button for industry application -

asp.net mvc 3 - Unexpected "foreach" keyword after "@" character -