views:

1143

answers:

3

I just want to verify, is yield return a shortcut for implementing IEnumerable and IEnumerator?

Thanks, John

+2  A: 

Yes. See the following for a starter

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

JaredPar
+9  A: 

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.

Jon Skeet
Great book! I'm actually on chapter 6, wasn't expecting an answer from the author!!! ;)
John
I'll trade you 10 upvotes for a signed copy.
FlySwat
@JH: as you can see, Jon Skeet is really in need of a reputation boost. If only the Dow was moving up as fast.
dpp
If the dow was moving that fast, I could afford his book =)
FlySwat
Seems to me that the Dow is moving plenty fast. Unfortunately it's been mostly moving fast down lately.
Michael Burr