class objA
{
public Rectangle area;
}
class objB
{
public Point somepoint;
}
List<objA> listA;
List<objB> listB;
现在,我想在objA.area.contains(objB.point)
答案 0 :(得分:1)
这应该可以解决问题:
result = listA.Select(a=>
new{
Rectangle = a,
Points =listB.Where(b=>a.Contains(b))
});
答案 1 :(得分:0)
您可以考虑进行from from where
样式查询,也称为非等连接:
from rect in listA
from point in listB
where rect.Area.Contains(point.SomePoint)
select new { rect, point }