首页 > 技术文章 > 获取交互次数(分页)

XuPengLB 2019-03-13 09:47 原文

public static int GetInterpurchaseTimes<T>(IEnumerable<T> list, int range = 100)
        {
            if (list != null && list.Count() > 0)
            {
                return (int)Math.Ceiling(list.Count() / (double)range);
            }
            return 0;
        }

  

推荐阅读