linq 实例
// Specify the data source.
int[] scores = new int[] { 97, 92, 81, 60 };
// Define the query expression.
IEnumerable<int> scoreQuery =
from score in scores
where score > 80
select score;
// Execute the query.
foreach (int i in scoreQuery)
{
Console.Write(i + " ");
}
本文来自博客园,作者:程序猿网友666,转载请注明原文链接:https://www.cnblogs.com/chenghu/p/3318365.html

浙公网安备 33010602011771号