ChunkBySize
Split the collection into chunks of size at most chunkSize
.
Parameters | Returns |
int chunkSize IEnumerable<T> source | IEnumerable<IEnumerable<T>> |
Exceptions
Type | When |
ArgumentException | chunkSize parameter isn't a positive value. |
Usage
A new collection is generated where each element is also a collection with at most chunkSize
length.
Splitting a collection in chunks with the same length
Splitting a collection in chunks with different lengths
Last updated