Iterate only once using LINQ Funny thing, the following test works:

    [TestMethod]
    public void Iterate_Once()
    {
        var x = new[] { 1, 2, 3, 4, 5, 6 }.ToIterable();
        CollectionAssert.AreEqual(new[] { 1, 2 }, x.Take(2).ToArray());
        CollectionAssert.AreEqual(new[] { 3, 4, 5 }, x.Take(3).ToArray());
    }


Where:

static class Iterable
{
    public static IEnumerable&lt;T&gt; ToIterable&lt;T&gt;(this IEnumerable&lt;T&gt; source)
    {
        var it = source.ToList().GetEnumerator();
        return once();

        IEnumerable&lt;T&gt; once()
        {
            while (it.MoveNext())
                yield return it.Current;
        }
    }
}


That should be safe to do not dispose an iterator of in-memory collection.

Please do not put me in jail for that :)
So what you are trying to do is to have an implementation of IEnumerable&lt;T&gt; which has a singleton IEnumerator&lt;T&gt;? Why not implement that explicitly, instead of using undocumented (?) behaviour of List&lt;T&gt;'s iterator?

Simply create a class that consumes a IEnumerable&lt;T&gt;, takes its iterator and wraps it in an implementation of IEnumerator&lt;T&gt; that has a dysfunctional Reset method. IEnumerator&lt;T&gt;.GetEnumerator() can then return the instance to that same iterator instead of creating a new one for each call. It could look something like this:

  public class OnlyOnceIterator&lt;T&gt; : IEnumerable&lt;T&gt;, IEnumerator&lt;T&gt; {
    private readonly IEnumerator&lt;T&gt; enumerator;
    internal OnlyOnceIterator(IEnumerable&lt;T&gt; sequence) {
      enumerator = sequence.GetEnumerator();
    }

    public T Current =&gt; enumerator.Current;

    object IEnumerator.Current =&gt; enumerator.Current;

    public void Dispose() {
      enumerator.Dispose();
    }

    public IEnumerator&lt;T&gt; GetEnumerator() =&gt; this;

    public bool MoveNext() {
      return enumerator.MoveNext();
    }

    public void Reset() {
      return;
    }

    IEnumerator IEnumerable.GetEnumerator() =&gt; this;
  }


This could then be used in an extension method:

  public static OnlyOnceIterator&lt;T&gt; ToOnlyOnceIterator&lt;T&gt;(this IEnumerable&lt;T&gt; sequence) {
    if (sequence == null) {
      throw new System.ArgumentNullException(nameof(sequence));
    }

    return new OnlyOnceIterator&lt;T&gt;(sequence);
  }


Additionally, I would prefer a more specific return type than IEnumerable&lt;T&gt;, since the returned behaviour is significantly different to what any user might expect from IEnumerable&lt;T&gt;. Consider creating a new interface that inherits from IEnumerable&lt;T&gt; with a more descriptive name. Through inheritance, Linq will still be able to be used, and you can create methods that only accept this specific interface, (compare this to IOrderedEnumerable&lt;T&gt;).