标签:names ring color each rom adk col linq class
1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace linq延迟状态终止 8 { 9 class Program 10 { 11 static void Main(string[] args) 12 { 13 List<string> arr = new List<string>() { "abc", "bcd", "efg" }; 14 var linq = (from r in arr where r.StartsWith("b") select r); 15 Console.WriteLine("one"); 16 foreach (string t in linq) 17 { 18 Console.WriteLine(t); 19 } 20 arr.AddRange(new string[] { "bbb","b2"}); 21 Console.WriteLine("two"); 22 foreach (string t in linq) 23 { 24 Console.WriteLine(t); 25 } 26 Console.ReadKey(); 27 } 28 } 29 }
标签:names ring color each rom adk col linq class
原文地址:https://www.cnblogs.com/lceihen/p/13338849.html