How to use IEnumerable/IEnumerator - Online Free Computer Tutorials.

'Software Development, Games Development, Mobile Development, iOS Development, Android Development, Window Phone Development. Dot Net, Window Services,WCF Services, Web Services, MVC, MySQL, SQL Server and Oracle Tutorials, Articles and their Resources

Saturday, March 31, 2012

How to use IEnumerable/IEnumerator

IEnumerable is an interface, implemented by System.Collecetion type in .Net that provides iterator pattern. The definition according to MSDN is:

"Exposes the enumerator, which supports simple iteration over non-generic collection."

It's something that you can loop over. That might be a List or Array or anything else that supports foreach loop.

IEnumerator allows you to iterate over List or array, and processes each element one by one

3 comments: