标签:
class Program { //泛型集合中的where static void Main(string[] args) { List<int> nums = new List<int>() { 1,2,3,4,5}; IEnumerable<int> num = nums.Where(n => n > 2); foreach (var item in num) { Console.WriteLine(item); } Console.ReadKey(); } }
标签:
原文地址:http://www.cnblogs.com/phpweige/p/4801638.html