1 using System; 2 using System.Linq; 3 4 namespace ConsoleApplication8 5 { 6 class Program 7 { 8 static void Main(string[] args) 9 { 10 int[] arr = new int[] { 15, 18, 20, 85, 60, 32, 21, 1, 1317, 120 }; 11 var m = from n in arr where n < 50 orderby n select n; 12 foreach (var item in m) 13 { 14 Console.WriteLine(item); 15 } 16 Console.ReadKey(); 17 } 18 } 19 }