Is Yield Return == IEnumerable & IEnumerator?

2019-03-09 12:03发布

Is yield return a shortcut for implementing IEnumerable and IEnumerator?

3条回答
Melony?
2楼-- · 2019-03-09 12:30
乱世女痞
3楼-- · 2019-03-09 12:34

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.

查看更多
登录 后发表回答