I have 2 string arrays for example
string[] a = {"The", "Big", "Ant", "The"};
string[] b = {"Big", "Ant", "Ran" };
Here I am comparing two string[] (a may contains duplicate elements as well). How to get not matched elements while comparing a and b in b(with duplicates as well). In Linq Except i am not getting duplicate records. I need to get duplicates as well.
b = a.Except(b).ToArray();
Expected result is ("The" doesn't appear in b and "Run" is not in a)
{"The", "The", "Ran"}
Thanks