A simple example of LINQ

Here we take a simple example of LINQ. We just compare a number with a number of digits:
  1. int[] digits = { 5, 4, 1, 7, 9, 8, 6, 7, 4, 5 };  
  2.   
  3. var num =  
  4. from n in digits  
  5. where n >= 6  
  6. select n;  
  7.   
  8.   
  9. Console.WriteLine("Numbers < 5:");  
  10. foreach (var x in num)  
  11. {  
  12. Response.Write(x);  
  13. }