By alashcraft
via codethinked.com
Published: Jun 11 2008 / 06:47
I came across this post yesterday that was talking about the "yield return" statement in C#. It is probably one of the most underused features of C# 2.0! And yes, it was introduced in C# 2.0. :) The author does an excellent job explaining what the "yield return" statement does, and that is to essentially pause the execution of the method so that next time it is called the function resumes where it left off. It is a very limited implementation of a continuation, where we are effectively weaving the execution of the method being called with the caller.



Add your comment