I have two arrays:
string[] array1 = { \"Red\", \"blue\", \"green\", \"black\" }; string[] array2 = { \"BlUe\", \"yellow\", \"black\" };
I
How about an Enumerable.Intersect and StringComparer combo:
// other options include StringComparer.CurrentCultureIgnoreCase // or StringComparer.InvariantCultureIgnoreCase var results = array1.Intersect(array2, StringComparer.OrdinalIgnoreCase);