One of my friend was asked this question in an interview -
In LINQ:
var unique1 = (from a in arrayA where !arrayB.Contains(a) select a).First();
var unique2 = (from b in arrayB where !arrayA.Contains(b) select b).First();
return new Pair(unique1, unique2);
...
public sealed class Pair
{
public T0 Item1 {get;set;}
public T1 Item2 {get;set;}
public Pair(T0 item1, T1 item2)
{
Item1 = item1;
Item2 = item2;
}
//plus GetHashCode, equality etc.
}