Candor.PagingOptions.GetTotalPageCount C# (CSharp) Method

GetTotalPageCount() public method

Gets the total number of pages given the current paging details.
public GetTotalPageCount ( ) : int
return int
        public int GetTotalPageCount()
        {
            int items = Math.Max(0, TotalItemCount);
            if (!enabled_ || PageSize > TotalItemCount)
                return Math.Min(items, 1); // 0 or 1
            else
                return (int)Math.Ceiling((double)items / (double)PageSize);
        }