I've been searching about this question for a few hours but I didn't find my answer so I ask it:
I'm looking for a method or something to round 25,599,999
to 25,000,000
or 25,599,999
to 30,000,000
:
int num1 = 25599999;
Console.WriteLine(RoundDown(num1, 6 /* This is the places (numbers from end that must be 0) */)) // Should return 25,000,000;
or Round Up:
int num1 = 25599999;
Console.WriteLine(RoundUp(num1, 6 /* This is the places (numbers from end that must be 0) */)) // Should return 30,000,000;
Note: I'm not looking for a way to round decimal numbers.