Hi,
Today i have read on stackoverflow some user that ask how to divide a list into equal part.
So i have decided to write on my blog the code that can help someone.
const int maxSize = 500;
for (int i = 0; i < theList.Count(); i += maxSize)
{
int takePart = (theList.Count() - i) < maxSize? theList.Count() - i : maxSize;
Class[] arrayPart = (from G in theList.Skip(i).Take(maxSize) select new Class {}).toArray();
}
I hope that can help!
Peace and Code!
Thanks for sharing interesting and informative post.
Amazing article. Your tutorial blog site is really helpful for us.
Thank you so much!