I am trying to split a collection into multiple collections while maintaining a sort I have on the collection. I have tried using the following extension method, but it breaks
double partLength = list.Count() / (double)parts;
int i = 0;
var splits = from name in list
group name by Math.Floor((double)(i++ / partLength)) into part
select part;