Can someone demystify the yield keyword?
问题 I have seen the yield keyword being used quite a lot on Stack Overflow and blogs. I don't use LINQ. Can someone explain the yield keyword? I know that similar questions exist. But none really explain what is its use in plain simple language. 回答1: By far the best explanation of this (that I've seen) is Jon Skeet's book - and that chapter is free! Chapter 6, C# in Depth. There is nothing I can add here that isn't covered. Then buy the book; you will be a better C# programmer for it. Q: Why didn