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'd like to have the syntax of some other languages like Python, Haskell, etc.
// Write the numbers 1 thru 7 foreach (int index in [1..7]) { Console.WriteLine(index); }
Fortunatly, we got F# now :)
As for C#, I'll have to stick with the Enumerable.Range method.
Enumerable.Range