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 Query

More Query from same tag