查询数组
int[] arr = new int[] {5, 1, 9, 3, 4, 0, 8 };
var m = from item in arr
select item;
foreach (var item in m)
{
Response.Write(item.ToString() + "<br>");
}
var m = from item in arr
select item;
foreach (var item in m)
{
Response.Write(item.ToString() + "<br>");
}
结果:
5
1
9
3
4
0
8
1
9
3
4
0
8