参考站点:http://baike.baidu.com/view/965131.htm?fr=ala0
如:
int[] arr = new int[] { 8, 5, 89, 3, 56, 4, 1, 58 }; var m = from n in arr where n < 5 orderby n select n;foreach (var n in m){ Console.WriteLine(n);}
功能为查询一个int 数组中小于5的数字,并按照大小顺序排列