Let us say I have this code
string seachKeyword = \"\";
List sl = new List();
sl.Add(\"store\");
sl.Add(\"State\");
sl.Add(\"STAM
Use Linq, this adds a new method to .Compare
using System.Linq;
using System.Collections.Generic;
List MyList = new List();
MyList.Add(...)
if (MyList.Contains(TestString, StringComparer.CurrentCultureIgnoreCase)) {
//found
}
so presumably
using System.Linq;
...
List searchResults = sl.FindAll(s => s.Contains(seachKeyword, StringComparer.CurrentCultureIgnoreCase));