Search code examples
c#stringformatcurrency

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,


Solution

  • string forDisplay = currentBalance.ToString("N2");