The main reason for this recommendation is that the foreach construct internally calls the Enumerator itself. Additionally, the Current property of the IEnumerator returns an object while the foreach construct allows for strongly typed iteration.
- [DotNetDevelopment] foreach vs. IEnumerator John Smith
- [DotNetDevelopment] Re: foreach vs. IEnumerator Cerebrus
- [DotNetDevelopment] Re: foreach vs. IEnumerator Theraot
