John
John

Reputation: 5471

Is Yield Return == IEnumerable & IEnumerator?

Is yield return a shortcut for implementing IEnumerable and IEnumerator?

Upvotes: 33

Views: 7987

Answers (3)

Jon Skeet
Jon Skeet

Reputation: 1503839

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.

Upvotes: 32

JaredPar
JaredPar

Reputation: 755557

Yes. See the following for a starter

http://msdn.microsoft.com/en-us/library/dscyy5s0.aspx

Upvotes: 2

Related Questions