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