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
Post a Comment