The simplest formula to calculate page count?
<p>I have an array and i want to divide them into page according to preset page size.</p>

<p>This is how i do:</p>

<pre><code>  private int CalcPagesCount()   {

       int  totalPage = imagesFound.Length / PageSize;

        //add the last page, ugly
        if (imagesFound.Length % PageSize != 0) totalPage++;

        return totalPage;
    }
</code></pre>

<p>I feel the calculation is not the simplest(I am poor in math), can you give one simpler calculation formula?</p>
