Enumerable.union Method

Produces the set union of two sequences optionally using an equality comparer to compare values.
 
 
Static This method is static.

Parameters

first

Type: IEnumerable
An enumerable whose distinct elements form the first set for the union.
second

Type: IEnumerable
An enumerable whose distinct elements form the second set for the union.
equalityComparer

Type: IEqualityComparer
An equality comparer to compare values.
Optional: True

Return Value


Type: IEnumerable
An enumerable that contains the elements from both input sequences, excluding duplicates.