Format Number for Display

How can output a double or decimal with 2 numbers after the decimal, and a comma when it's supposed to for every 3 digits?  I also don't want a $ dollar sign.  

When I so String.Format("{0:c}" ) it give the dollar sign I don't want.

When I do Math.Round(myVariable) I don't get the comma at every 3rd digit.

Is there
LVL 1
champ_010Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
chintan_vaishyaConnect With a Mentor Commented:
HI,

Use this.

string.Format("{0:0,0.00}",12345332.8)

This gives output as,

12,345,332.80


This is exactly you want, i think

Good luck.
Chintan.
0
 
champ_010Author Commented:
hmmm...that will display the way i want alright--by any chance is there a way to keep it an integer type so that i can still perform calculations on it?

thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.