Hello everyone,


I can not find too much materials about yield return. In MSDN sample,

http://msdn.microsoft.com/en-us/libr...f0(VS.80).aspx

what happens behind the scene of statement, "yield return result"?

I think what happens is a object instance which implements IEnumerable (collection pattern) interface is created (but what is the type of the instance? some C# internal type?), and each time "yield return result" is called, a new element is inserted into the internal array of the instance. Any more reference documents?


thanks in advance,
George