Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 1.35 KB

return-the-set-union-of-two-sequences.md

File metadata and controls

28 lines (20 loc) · 1.35 KB
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
csharp
vb
8b8bd3cb-86d4-4a3b-9906-61f68726dd1f

Return the Set Union of Two Sequences

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

Example

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.

See also