About 17,800,000 results
Open links in new tab
  1. yield statement - provide the next element in an iterator - C# ...

    Nov 24, 2025 · Use the yield statement in iterators to provide the next value or signal the end of an iteration

  2. yield Keyword - Python - GeeksforGeeks

    Jul 29, 2025 · In Python, yield keyword is used to create generators, which are special types of iterators that allow values to be produced lazily, one at a time, instead of returning them all at …

  3. What is the yield keyword used for in C#? - Stack Overflow

    Sep 2, 2008 · The yield keyword allows you to create an IEnumerable<T> in the form on an iterator block. This iterator block supports deferred executing and if you are not familiar with …

  4. Python yield Keyword - W3Schools

    Unlike the return keyword which stops further execution of the function, the yield keyword returns the result so far, and continues to the next step. The return value will be a list of values, one …

  5. C# yield keyword (With Examples) - Programiz

    The yield keyword performs custom iteration over a collection like list, array, etc.In this tutorial, you will learn about the C# yield keyword with the help of examples.

  6. yield | Python Keywords – Real Python

    In Python, the yield keyword turns a function into a generator function, returning an iterator that generates values on demand rather than generating them all at once.

  7. The yield Keyword in C# - Delft Stack

    Mar 11, 2025 · In this article, we will explore the yield keyword, how it works, and its practical applications in C#. Whether you’re a seasoned developer or just starting out, understanding …

  8. A Gentle Introduction to the yield Keyword in C# - Medium

    Dec 13, 2024 · The yield keyword is used inside iterator methods (methods that return IEnumerable or IEnumerable<T>) to return elements one at a time, while maintaining the …

  9. C# - yield Example - Dot Net Perls

    Aug 6, 2025 · We use the yield -keyword in methods that return the type IEnumerable (without any angle brackets), or the type IEnumerable with a type parameter in the angle brackets.

  10. C# | Yield Keyword - DevTut

    The yield keyword is used to define a function which returns an IEnumerable or IEnumerator (as well as their derived generic variants) whose values are generated lazily as a caller iterates …