description | title | ms.date | dev_langs | ms.assetid | ||
---|---|---|---|---|---|---|
Learn more about: Return the Set Union of Two Sequences |
Return the Set Union of Two Sequences |
03/30/2017 |
|
8b8bd3cb-86d4-4a3b-9906-61f68726dd1f |
Use the xref:System.Linq.Queryable.Union%2A operator to return the set union of two sequences.
This example uses xref:System.Linq.Queryable.Union%2A to return a sequence of all countries/regions in which there are either Customers
or Employees
.
[!code-csharpDLinqQueryExamples#43] [!code-vbDLinqQueryExamples#43]
In [!INCLUDEvbtecdlinq], the xref:System.Linq.Queryable.Union%2A operator is defined for multisets as the unordered concatenation of the multisets (effectively the result of the UNION ALL
clause in SQL).
For more info and examples, see xref:System.Linq.Queryable.Union%2A?displayProperty=nameWithType.