Split List into Sublists with LINQ

前端 未结 30 2936
灰色年华
灰色年华 2020-11-21 06:26

Is there any way I can separate a List into several separate lists of SomeObject, using the item index as the delimiter of each s

30条回答
  •  我寻月下人不归
    2020-11-21 06:46

    System.Interactive provides Buffer() for this purpose. Some quick testing shows performance is similar to Sam's solution.

提交回复
热议问题