IEnumerator.Current property and IEnumerator.MoveNext method

Posted by nmarun on ASP.net Weblogs See other posts from ASP.net Weblogs or by nmarun
Published on Wed, 22 Jun 2011 08:21:57 GMT Indexed on 2011/06/22 8:23 UTC
Read the original article Hit count: 252

Filed under:
|
Here’s a question: What happens to the Current property of an IEnumerator before and after the MoveNext() call? When I say ‘after the MoveNext() call’, I mean after MoveNext() returns a false indicating an end of the collection. I was going through the MSDN for IEnumerator.Current and the first paragraph basically boils down to: If MoveNext() method has never been called on an IEnumerator, the Current property is undefined. I wanted to know what ‘undefined’ means – is it null? If so, what if the...(read more)

© ASP.net Weblogs or respective owner

Related posts about c#

Related posts about .NET