Nóta
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað aðskrá þig inn eða breyta skráasöfnum.
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað að breyta skráasöfnum.
Use the Intersect operator to return the set intersection of two sequences.
Example
This example uses Intersect to return a sequence of all countries/regions in which both Customers and Employees live.
var infoQuery =
(from cust in db.Customers
select cust.Country)
.Intersect
(from emp in db.Employees
select emp.Country)
;
Dim infoQuery = _
(From cust In db.Customers _
Select cust.Country) _
.Intersect _
(From emp In db.Employees _
Select emp.Country)
In LINQ to SQL, the Intersect operation is well defined only on sets. The semantics for multisets is undefined.