using System.Collections.Generic;
public static void Main()
List<string> fruits = new() { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" };
IEnumerator<string> e = fruits.GetEnumerator();
var firstThree = e.Take(3);
var nextThree = e.Take(3);
foreach (var x in firstThree)
foreach (var x in nextThree)
public static class Extensions
public static List<T> Take<T>(this IEnumerator<T> e, int num)
List<T> list = new List<T>(num);
while (taken < num && e.MoveNext())