Houman Houman - 3 days ago 6
C# Question

Format a double value like currency but without the currency sign (C#)

I feed a textbox a string value showing me a balance that need to be formatted like this:

###,###,###,##0.00


I could use the value.ToString("c"), but this would put the currency sign in front of it.

Any idea how I would manipulate the string before feeding the textbox to achieve the above formatting?

I tried this, without success:

String.Format("###,###,###,##0.00", currentBalance);


Many Thanks,

Answer
string forDisplay = currentBalance.ToString("N2");
Comments