I have some prices in my DB which are stored as data type money and have the following code:
result.RangeMinimum = (decimal)ad.RangeMinimum;
result.RangeMaximum = (decimal)ad.RangeMaximum;
The output is:
38000
and
42000
Ideally, what I want is something [exactly] like this:
38, 000.00
and
42, 000.00
How can I achieve this? I mean, is there already an existing class out there that’s built into the .NET framework or something?
What you want to achieve can be done through custom numeric format, i.e., for the
ToString()method or theString.Format()methodMDSN Custom Numeric Format