Asked • 03/18/19

How to always round up to the next integer?

I am trying to find total pages in building a pager on a website (so i want the result to be an integer. I get a list of records and i want to split into 10 per page (the page count)when i do this: list.Count() / 10 or list.Count() / (decimal)10and the `list.Count() =12`, i get a result of `1`. How would I code it so i get `2` in this case (the remainder should always add `1`)?

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.