Click here to Skip to main content
13,197,342 members (45,425 online)
Click here to Skip to main content


21 bookmarked
Posted 7 Apr 2013

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

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



Compare Revision Minor Date Status Editor
12 - publicly available Yes 21-Apr-13 10:53 Available Mike-MadBadger
The article has been approved
11 No 21-Apr-13 9: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 22:02 Pending Mike-MadBadger
Updates in content.
7 No 11-Apr-13 20:00 Pending Mike-MadBadger
Updates in content.
6 No 11-Apr-13 13:13 Available Smitha Nishant
Updates in content.
5 No 11-Apr-13 11:56 Pending Mike-MadBadger
Updates in content. 10209 changes had been made.
3 No 7-Apr-13 20:32 Pending Mike-MadBadger
Source and Demo links
2 No 7-Apr-13 10:12 Composing Mike-MadBadger
Updates in content. 14 changes had been made.
1 No 7-Apr-13 7: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...

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