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

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -