获取交互次数

int GetInterpurchaseTimes<T>(IEnumerable<T> list, int range = 100)
        {
            if (list != null && list.Count() > 0)
            {
                return list.Count() / range + (list.Count() % range > 0 ? 1 : 0);
            }
            return 0;
        }

  

猜你喜欢

转载自www.cnblogs.com/XuPengLB/p/10521103.html