Related questions
Round to nearest five
I need to round a double to nearest five. I can't find a way to do it with the Math.Round function. How can I do this?
What I want:
70 = 70
73.5 = 75
72 = 70
75.9 = 75
69 = 70
and so on..
Is there an easy way to do …
How to round double values but keep trailing zeros
In C# I want a function that rounds a given double to a given amount of decimals. I always want my function to return a value (which can be a string) with the given amount of decimals. If necessary, trailing …
decimal vs double! - Which one should I use and when?
I keep seeing people using doubles in C#. I know I read somewhere that doubles sometimes lose precision.
My question is when should a use a double and when should I use a decimal type?
Which type is suitable for …