One advantage with using foreach loops in the C# language is that foreach eliminates your need to track indexer variables, such as i or x. The code becomes safer and more robust by hiding all the details from the programmers using the array.
also referenced here: http://awglearned.blogspot.com/2012/02/yield-keyword.html
No comments:
Post a Comment