将List<string> srcDocCode的数据按照20一组拆分。
List<List<string>> listGroup = new List<List<string>>(); int j = 20; for (int i = 0; i < srcDocCode.Count; i += 20) { List<string> cList = new List<string>(); cList = srcDocCode.Take(j).Skip(i).ToList(); j += 20; listGroup.Add(cList); }
时间: 2024-10-18 06:54:44