Question: How do you Round Down the number to the nearest decimal point in C#? the number I want to round down is 0.7777777777777777771, when I round use
Math.Round(MyNumber,02) the answer is 0.78. I don't want this answer, I wanted 0.77.
How do you do that with Math.Round() Method?
Login to See the Rest of the Answer
Answer: See the code below:
decimal myRoundDownValue = Math.Round(MyNumber,2,MidpointRounding.ToNegativeInfinity); //
If you want to get a positive number from a subtraction in C sharp just use Decimals and absolute values.