TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Thomas
NA
111
0
rounding to nearest .5
Mar 14 2012 2:34 PM
I had an interesting request and I'm wondering if there is a better way to do it
I have a percentage calculation and they are asking to have it round not to the nearest tenth but to the nearest .5. I can do it by checking what the last number is and writing code to round down to .0 or up to .5 if under .5 and Up to .0 or down to .5 if over. But that seems really clunky and more complex than needed.
Any other ideas out there?
Reply
Answers (
2
)
System.IO.FileNotFoundException when using BinaryFormatter.
Issue while exporting dataset to excel