int[] arr1 = { 32, 3, 432, 543, 23, 5, 634 };
int[] arr2 = { 64, 4, 8, 3, 3, 6, 23, 5, 2 };
var query1 = from val in arr1 from val2 in arr2 where val % val2 == 0 group val by val2;
foreach (var item in query1)
{
Console.WriteLine(item.Key);
foreach (var i in item)
{
Console.WriteLine("------------------" + i);
}
}
Linq两个from查询条件
最新推荐文章于 2022-04-24 12:35:00 发布