In C# 3.0, I\'m liking this style:
// Write the numbers 1 thru 7 foreach (int index in Enumerable.Range( 1, 7 )) { Console.WriteLine(index); }
I do like the foreach + Enumerable.Range approach and use it sometimes.
foreach
Enumerable.Range
// does anyone object to the new style over the traditional style? foreach (var index in Enumerable.Range(1, 7))
I object to the var abuse in your proposal. I appreciate var, but, damn, just write int in this case! ;-)
var
int