Round(10773.31)
Round(10773.55)
i want like 10780 in linq or .net
Round function
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Apr 8, 2011, 5:22 AM EDT
static double RoundToHigherTen(double d)
{
return (int)((d + 9.9999999)/ 10) * 10;
}
// ...
double result = RoundToHigherTen(10773.31);
Console.WriteLine(result);
piyush sardhara177 reputationPosted Apr 9, 2011, 2:04 AM EDT
get answer