If I have the value 0.0042 returned and I pass this to:
string.Format(“{0:C}”,….);
It displays $0 as the results when I want it to actually display:
$0.0042
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
“C” is the default currency format string, which will always truncate your number to two decimal places. You need to specify the number of decimal places if you’re dealing with tiny fractions of a cent.
Try
More currency formatting options can be found here.