I have an data table(dt1) of 40 records,copy first 20 records to another data table(dt2) and do some transactions on dt2 and remove first 20 records from dt1 and copy next 20 records to dt2.
How can we achieve this …for copying to datatable we can use
Dt2=Dt1.AsEnumerable().Take(20).CopyToDataTable()
how can we do deleting top 20 records from Dt1 at a time?
Thanks Pradeep for Reply.
for example if a have 60 records (which is not a fixed number) For Third run i need to skip first 40 records,so i can’t hard code 20 value with Skip,but if i am able to delete first 20 rows then i can select first 20 rows as any how first 20 rows are deleted