using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class Program
{
static void Main(string[] args)
{
Random generator = new Random(0);
int[] numbers = new int[1000];
for (int i = 0; i < 1000; i++)
{
numbers[i] = generator.Next();
}
var queryResults = from n in numbers where n < 100 select n;
foreach (var item in queryResults)
{
Console.WriteLine(item);
}
}
}
|