How can I get 'Intersect' to return true for a partial word match in a Linq query in? I need a .Contains() .Intersect()
hybrid of sorts.
List<string> sParams = new List<string>(){"SAND", "PURPLE"};
//One of my Prices has the color "Sanddust"
Prices.Where(x => x.Color.ToUpper().Split(null).Intersect(sParams).Any());
The above query only returns exact string match intersects, but I need to to return true as the string "SANDDUST" contains "SAND".