Skip to content

Instantly share code, notes, and snippets.

@BrunoCaimar
Created April 19, 2010 18:40
Show Gist options
  • Select an option

  • Save BrunoCaimar/371420 to your computer and use it in GitHub Desktop.

Select an option

Save BrunoCaimar/371420 to your computer and use it in GitHub Desktop.
static void Main(string[] args)
{
int[] oneToNine = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
var query =
from i1 in oneToNine
from i2 in oneToNine
from i3 in oneToNine
select i1 + (10 * i2) + (100 * i3) ;
foreach (int n in query.OrderBy(n => n))
{
Console.WriteLine("{0}",n);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment