Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (18 sloc) 1.19 KB
title ms.date dev_langs ms.assetid
Return the Set Intersection of Two Sequences
03/30/2017
csharp
vb
d09c344e-3548-4944-a3ed-051880e3f5b8

Return the Set Intersection of Two Sequences

Use the xref:System.Linq.Queryable.Intersect%2A operator to return the set intersection of two sequences.

Example

This example uses xref:System.Linq.Queryable.Intersect%2A to return a sequence of all countries/regions in which both Customers and Employees live.

[!code-csharpDLinqQueryExamples#42] [!code-vbDLinqQueryExamples#42]

In [!INCLUDEvbtecdlinq], the xref:System.Linq.Queryable.Intersect%2A operation is well defined only on sets. The semantics for multisets is undefined.

See also

You can’t perform that action at this time.