public class Person
{
public int Id{get;set;}
public string Name{get;set;}
}
public class Test
{
private readonly IPersonDataService _personDataService;
public Test(IPersonDataService personDataService)
{
_personDataService=personDataService;
}
List<Person> persons=_personDataService.GetList();
List<List<Person>> personLists=new <List<Person>>();
}
Imagine the persons
list contains 50 items.I want to be able to extract 5 lists of 10 items each from persons
and add each list to personLists
.
In the end the personLists
should have 5 items where each item is a List containing 10 items each.