I have two string arrays which I need to compare for the like strings.
string[] f1 = {"Ann", "mam", "far", "aBc"};
string[] f2 = {"ann", "nom", "far", "abc"};
Parallel.ForEach(f1, currenFile =>
{
if (f2.Contains(currenFile, StringComparison.OrdinalIgnoreCase))
{
Console.WriteLine("matchfound"+currenFile);
}
});
I am trying to see if f2 contains the word from f1 ignoring case. However intelisense has error on "StringComparison.OrdinalIgnoreCase" Saying
argument type System.StringComparission is not assignable to parameter type Systems.Collections.Generic.IEqualityComparer
Please let me know how can i fix this error.