C# List分组

//分组  8个为一组 
List<List<string>> ArrayList = sArray.Select((x, i) => new { Index = i, Value = x })
.GroupBy(x => x.Index / 8)
.Select(x => x.Select(v => v.Value).ToList())
.ToList();

 

posted @ 2021-05-14 09:15  是晚安呀  阅读(255)  评论(0编辑  收藏  举报