Imports System.Collections.Generic
Dim collection As IEnumerable(Of Integer) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
Dim result4 As IEnumerable(Of IEnumerable(Of Integer)) = collection.Select(Function(v, i) New With {.Value = v, .Index = i}) _
.GroupBy(Function(x) x.Index \ 4) _
.Select(Function(x) x.Select(Function(z) z.Value))
Dim result5 As IEnumerable(Of IEnumerable(Of Integer)) = collection.Select(Function(v, i) New With {.Value = v, .Index = i}) _
.GroupBy(Function(x) x.Index \ 5) _
.Select(Function(x) x.Select(Function(z) z.Value))
Console.WriteLine("4 Parts")
Console.WriteLine("---------------")
Console.WriteLine("5 Parts")
Console.WriteLine("---------------")