skij
asked on
ASP.NET / C#: Format as currency without cents
This:
Print ( (123.456789).ToString("C") );
formats my number like this:
$123.45
How can I format it like this?
$123
Print ( (123.456789).ToString("C")
formats my number like this:
$123.45
How can I format it like this?
$123
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This will do what you want.
(123.456789).ToString("C0" )
(123.456789).ToString("C0"
String.Format("{0:C0}", number)