Splitting an array using LINQ

前端 未结 7 1154
你的背包
你的背包 2020-12-10 15:02

I have a collection uni-dimensional like this:

[1,2,4,5.....n]

I would like to convert that collection in a bi-dimensional collection like

相关标签:
7条回答
  • 2020-12-10 16:03

    You want Take() and Skip(). These methods will let you split an IEnumerable. Then you can use Concat() to slap them together again.

    0 讨论(0)
提交回复
热议问题