public class Example
{
public static void Main()
{
Console.Write("<< Linq - Enumerable.Chunk 출력 예제 >> \n");
int i = 1;
foreach (int[] chunk in Enumerable.Range(0, 10).Chunk(3))
{
Console.WriteLine($"Chunk {i++}:");
foreach (int item in chunk)
{
Console.WriteLine($" {item}");
}
Console.WriteLine();
}
Console.WriteLine(System.Environment.NewLine);
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}
}