Lets say I have a datatable having 100 rowitems. I have to make 5 datatables of 20 rowitems out of the given input datatable. How do i do this?

Hi,

The following sample will help you.

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

Regards,