Is Yield Return == IEnumerable & IEnumerator?
-
08-07-2019 - |
Question
Is yield return
a shortcut for implementing IEnumerable
and IEnumerator
?
Solution
Yes, it is.
You can find out a lot more about it in chapter 6 of my book, C# in Depth. Fortunately chapter 6 is available for free from Manning's web site.
I also have two other articles on the book's web site.
Feedback welcome.
OTHER TIPS
To add to the link-fest, Raymond Chen did a nice little series on C# iterators a few months ago:
Yes. See the following for a starter
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow