0
Union computes mathematical unions. This extension method, from System.Linq, acts upon two collections. It returns a new collection that contains the elements that are found. It removes duplicates.
using System;
using System.Linq;
class Program
{
static void Main()
{
// Create two example arrays.
int[] array1 = { 1, 2, 3 };
int[] array2 = { 2, 3, 4 };
// Union the two arrays.
var result = array1.Union(array2);
// Enumerate the union.
foreach (int value in result)
{
Console.WriteLine(value);
}
}
}



