Explain C# yield keyword with an example


Getting back to my blogging, I just posted an interview question on my programminginterviews blog on http://www.programminginterviews.info/2012/05/explain-c-yield-keyword-with-example.html. This uses the C# yield keyword to iterate over a collection and return chunks of data to process.

Comments (2)

  1. Sanjay says:

    Good, simple example. Well explained

  2. Sachin says:

    Very Good Example. Thanks !!