Use skip() and Take() method in linq

Hi Guys
I need you help to understand in which scenario we can use skip() and Take() method togather
like below query use to split excel into chunks (235.0 KB)
Split_Excel_Files.xaml (18.1 KB)


Have a look here:

And have some practicals here:

Can anyone help me on this topic


How about the following?

Enumerable.Range(0,(dt.Rows.Count \ chunkSize)+1).Select(Function(i) dt.AsEnumerable.Skip(i*chunkSize).Take(ChunkSize).CopyToDataTable).ToArray (132.8 KB)


1 Like