I have this problem where I got a list of 5000 and 2000 entries.. The thing is everyone I want to use the 5000 entries list I have to manually type:
IEnumerable<string> partList1;
IEnumerable<string> partList2;
IEnumerable<string> partList3;
IEnumerable<string> partList4;
And then I go with:
partList1 = SplitList(IDList, 0, 999); //args = list,skipvalue,takevalue
And I have to do this for all 4 lists and if I use the 2000 entries list I only need two partLists. How can I go for it to make it dynamiclly that how often 999 fits into the list it creates the partLists itself?
I tried something like:
for(int i = 0; i < IDList.Count() / 999; i++) {
//and here I stuck
}