Round(10773.31)
Round(10773.55)
i want like 10780 in linq or .net
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
piyush sardharaPosted Apr 9, 2011, 6:04 AM
get answer
VulpesPosted Apr 8, 2011, 9:22 AM
static double RoundToHigherTen(double d)
{
return (int)((d + 9.9999999)/ 10) * 10;
}
// ...
double result = RoundToHigherTen(10773.31);
Console.WriteLine(result);