For example the list lstHazProduct
contains items like "NOTEBOOK LAPTOP", "MOBILE PHONE"
.
strTest = "SAMSUNG NOTEBOOK";
How to use linq
or %LIKE%
operator.
If the list items exist in the string, then condition met. Below doesn't work as it compare the string to the list items.
if (lstHazProducts.Where(s => s.HazpName.Contains(strTest)).Count() > 0)
{
//do something
}
Thanks.