blah blah blah is here! blah blah » Close

up1down
link

Have anybody implemented a 1000 separator as in Excel????

I wish that I can display the label text (int) with the 1000 separator applied to it.

I mean instead of showing 2150052, the user should get 2,150,052.

How can I do this????

last answered one year ago

2 answers

up1down
link

Try this:

label1.Text = "2150052";
int i = int.Parse(label1.Text); // or use 'long' if integers can exceed 2 billion or so
label1.Text = i.ToString("N0");

up1down
link

or use a numeric up/down control.

Feedback