LINQ C# Book

Except returns the elements in the first input sequence that are not present in the second:

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main()
{
int[] seq1 = { 1, 2, 3 };
int[] seq2 = { 3, 4, 5 };
IEnumerable difference1 = seq1.Except(seq2);
IEnumerable difference2 = seq2.Except(seq1);
foreach (int i in difference1)
{
Console.WriteLine(i);
}
foreach (int i in difference2)
{
Console.WriteLine(i);
}
}
}

The output:
1
2
4
5