7 posts about Yield Keyword by 7 contributors.
Know Yield Keyword? Share what you know with developers who are learning it.
In C#, the yield keyword is used to create iterators that return values one at a time without generating a full collection. It enables lazy evaluation, meaning elements are only computed when requested. This can lead to better performance and lower memory usage.
In today's programming landscape, continuous learning is essential for developers to enhance productivity and efficiency. C# introduces new features like yield return and yield break, optimizing code execution and memory usage. Let's explore their significance through practical examples.
The C# yield keyword signals to the compiler that the method in which it appears is an iterator block. The compiler generates a class to implement the behavior that is expressed in the iterator block.
In this article, you will learn about some of the top important C# features that are often not very well known.
Learn how the C# yield keyword returns sequence elements during iteration, preserves iterator state, and filters a collection without a temporary list.
In this article, you will learn what is yield and how to use the yield keyword in python?
Learn how C# yield return creates iterators, preserves iteration state, and returns prime numbers lazily through IEnumerable.
DevSocialUpcoming · 3rd editionAI Agents ConferenceNov 23–27, 2026Live onlineMembers only16days leftRegisterPublish an article in this category and earn +1,000 SHARP when it is approved.
Write an article