Accepted answer

Borrowing a similar solution form here:

string[] result = {"hello there", "héllo there","goodbye"};

string word = "héllo";

var compareInfo = CultureInfo.InvariantCulture.CompareInfo;

var filtered = result.Where(
      p => compareInfo.IndexOf(p, word, CompareOptions.IgnoreNonSpace) > -1);


You want to use the StringComparison.InvariantCultureIgnoreCase enum.


filtered = result.Contains(word, StringComparison.InvariantCultureIgnoreCase);

However this is only going to work with LinqToObject. If you are using LinqToSQL or LinqToEntityFramework or LinqToNHibernate, this will not work.

Related Articles