Welcome to Honest Illusion Sign in | Join | Help

May 2007 - Posts

What's inside a foreach() statement?

Recently I was looking at some C# code where the author, to loop through some collection, would frequently use call GetEnumerator() and the manually step through the collections, calling MoveNext(). It seemed to me that the code could be written more
Posted by James | 2 Comments
Filed under: , , ,

More Fun with C# Interators : A Counting Iterator

Michael Herman recently discovered a typo in the MSDN docs : " IEnumberable: the integer version of IEnumerable? :-) " This reminded me of a method that I've been planning on presenting here: A simple Counting iterator. Basically, it appears to be a collection
Posted by James | 4 Comments