c# - Hi, I have a dataset containing N number of records and i am trying to read each 100 records from dataset until it finish count -


i have dataset containing n number of records , trying read each 100 records dataset loop through , save them until reaches total count n in c#. couldn't through , looking or advice on how dot his..

assuming have untyped dataset:

dataset ds = new dataset(); //filling dataset var rows = ds.tables["mytable"].rows.oftype<datarow>().tolist(); var size = rows.count; var position = 0; var chunksize = 100; while (position < size) {     var chunk = rows.skip(position).take(chunksize);     position += chunksize; } 

Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -