What is the easiest way to compare the elements of two lists say A and B with one another, and add the elements which are present in B to A only if they are not present in A
I think this is all you really need to do:
var listB = new List{3, 4, 5}; var listA = new List{1, 2, 3, 4, 5}; var listMerged = listA.Union(listB);