<%= Math.Round(keyRate, 5) %>
So in our view, we use this to display a bunch of numbers. it seems when we have a whole number, it rounds to 2 decimals instead of 5. Is this expected behavior? If so, how would I change it.
Thanks!
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.
The second parameter to
Math.Round(d, decimals)is the number of fractional digits that will be returned at most. From MSDN:In your case you are passing a number with less fractional digits, so it remains unchanged.