int[] list = new int[] {1,2,3,4,5,6,7,8,9,10,11,2233 };
var query =
from num in list
where num > 5
select (string.Format("哈哈哈哈哈哈哈{0}", num));
foreach (var item in query)
{
Console.WriteLine(item);
}
Console.ReadKey();
linq语句是先执行还是等到执行foreach执行的时候再执行? |