Here is my query:
m_SelectedHandler = m_ListOfHandlers.SingleOrDefault(h => h.CountryNames.Contains(country.ToLower());
country
is a string and an argument to the method containing the assignment above. CountryNames
is a list of strings. How can I call ToLower
on each of the strings in CountryNames
so that I'll get valid matches for this query. Is there a better way to do a case-insensitive compare using LINQ?