Link to home
Start Free TrialLog in
Avatar of sbornstein2
sbornstein2

asked on

ASP.Net/C# - Format Currency Question

Hello all.  I have a field where I beleive I am using a string.format to make a currency number such as 1243.44.   I need to make a comma for any thousands such as 1,243.44.   The variable I have is a double and then I need to format that double.  How can I do this?
ASKER CERTIFIED SOLUTION
Avatar of Velio
Velio
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
in Vb.NET the equivalent would be the FormatCurrency function:

Function FormatCurrency(
   ByVal Expression As Object,
   Optional ByVal NumDigitsAfterDecimal As Integer = -1,
   Optional ByVal IncludeLeadingDigit As TriState = TriState.UseDefault,
   Optional ByVal UseParensForNegativeNumbers As TriState = TriState.UseDefault,
   Optional ByVal GroupDigits As TriState = TriState.UseDefault
) As String
Avatar of sbornstein2
sbornstein2

ASKER

i will try this in the AM and then grade it tomorrow.  Thanks for getting me this example I can try in the AM.