Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# chunk array linq

int pageSize = 2;
string[] strings = {"a", "b", "c", "d", "e"};
IEnumerable<string[]> chunks = strings.Chunk(pageSize);
//0 -> a,b
//1 -> c,d
//2 -> e
 
PREVIOUS NEXT
Tagged: #chunk #array #linq
ADD COMMENT
Topic
Name
4+5 =