Click here to Skip to main content
12,560,793 members (50,933 online)
Click here to Skip to main content


21 bookmarked

Pick Your Enumerator & Me.Understand Yield and IEnumerable (C#)

, 21 Apr 2013 CPOL
Using multiple enumerators and implementing IEnumerable with Yield or IEnumerator.



Compare Revision Minor Date Status Editor
12 - publicly available Yes 21-Apr-13 6:53 Available Mike-MadBadger
The article has been approved
11 No 21-Apr-13 5:32 Pending Mike-MadBadger
Version 5 (21 April 2013): Fixed issue with test for var == double.NaN, should have been double.IsNaN(var); added section on 'foreach == while (MoveNext()) + Current' further typographical errors fixe
9 No 12-Apr-13 18:02 Pending Mike-MadBadger
Updates in content.
7 No 11-Apr-13 16:00 Pending Mike-MadBadger
Updates in content.
6 No 11-Apr-13 9:13 Available Smitha Nishant
Updates in content.
5 No 11-Apr-13 7:56 Pending Mike-MadBadger
Updates in content. 10209 changes had been made.
3 No 7-Apr-13 16:32 Pending Mike-MadBadger
Source and Demo links
2 No 7-Apr-13 6:12 Composing Mike-MadBadger
Updates in content. 14 changes had been made.
1 No 7-Apr-13 3:02 Composing Mike-MadBadger
Initial creation


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

France France
A hobbyist begin-again-er!

Spent a few years longer ago than I care to remember with BBC Basic, a couple of years with Delphi about 10-15 years ago with a smattering af MS Access applications along the way. Dropped out of it completely except for the occasional Excel macro.

Finally picked up the baton again with VB.Net in VS2010 and now VS 2012and have been playing around quite a bit with a few odds and sodds, learning much as I go - and long may it continue.

I don't work even close to the IT industry and probably never will, but I do enjoy it as a hobby.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.161026.1 | Last Updated 21 Apr 2013
Article Copyright 2013 by Mike-MadBadger
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid