var a = new string[] {
"item 1",
"item 2",
"item 3",
"item 4",
"item 5",
"item 6",
"item 7",
"item 8",
"item 9",
};
var q = from a...;
foreach(var a1 in q.Items)
{
foreach (var a2 in a1.Items)
{
}
}
public static IEnumerable<IEnumerable<T>> Split<T>(
this IEnumerable<T> source,
int count)
{
return source
.Select((x, y) => new { Index = y, Value = x })
.GroupBy(x => x.Index / count)
.Select(x => x.Select(y => y.Value).ToList())
.ToList();
}