About 19,200,000 results
Open links in new tab
  1. What is the difference between IEnumerator and IEnumerable?

    An Enumerator shows you the items in a list or collection. Each instance of an Enumerator is at a certain position (the 1st element, the 7th element, etc) and can give you that element …

  2. What Is an IEnumerator In C# and what is it used for in Unity?

    Oct 8, 2020 · I Enumerator being so called implies it is an interface, so any class that implements the IEnumerator interface can be returned by this method In practice in this use it seems that …

  3. Distinction between iterator and enumerator - Stack Overflow

    Jul 23, 2016 · An interview question for a .NET 3.5 job is "What is the difference between an iterator and an enumerator"? This is a core distinction to make, what with LINQ, etc. Anyway, …

  4. c# - Simple IEnumerator use (with example) - Stack Overflow

    IEnumerator is an interface. The underlying implementor of IEnumerator could do actions that require cleaning up, for example opening a file or a socket and returning values based on the …

  5. c# - obtain generic enumerator from an array - Stack Overflow

    Aug 13, 2009 · In C#, how does one obtain a generic enumerator from a given array? In the code below, MyArray is an array of MyType objects. I'd like to obtain MyIEnumerator in the fashion …

  6. Definition of 'enumerator' in C# - Stack Overflow

    Aug 5, 2010 · An enumerator helps you enumerate (iterate) over a collection of items. You can infer the purpose by simply looking at the members of the IEnumerator Interface. More …

  7. Что такое IEnumerable и IEnumerator в C#? [закрыт]

    Jul 24, 2021 · Что такое IEnumerable и IEnumerator в C#? Я много искал в интернете информации об этом, но везде объясняется слишком научно и непонятно. Можете …

  8. Can anyone explain IEnumerable and IEnumerator to me?

    IEnumerable , IEnumerator vs foreach, when to use what What is the difference between IEnumerator and IEnumerable? Enumerator preserves the state (iteration position) between …

  9. c# - Using IEnumerator to iterate through a list - Stack Overflow

    Jan 4, 2017 · Read documentation: "After an enumerator is created, the enumerator is positioned before the first element in the collection, and the first call to MoveNext advances the …

  10. Is there a built-in way to convert IEnumerator to IEnumerable

    Jun 22, 2009 · public static IEnumerable<T> ToIEnumerable<T>(this IEnumerator<T> enumerator) { while ( enumerator.MoveNext() ) { yield return enumerator.Current; } } compared …