In the How Can I Expose Only a Fragment of IList<> question one of the answers had the following code snippet:
IEnumerable
Intuitively, the keyword returns a value from the function without leaving it, i.e. in your code example it returns the current item
value and then resumes the loop. More formally, it is used by the compiler to generate code for an iterator. Iterators are functions that return IEnumerable
objects. The MSDN has several articles about them.