Hi!

I have a List<SearchCriteria> variable which basically store a list of searchitems. Each item has a Value property which is a string.

Now when I want to use this list to search, I need to set certain values, for example I want to show only used cars, I have a value for this. I tried to write this lambda expression to do this but I got error "cannot implicitly convert type string to bool

Code:
this.CarsSearchCriteria.Where(n => n.CriteriaId == SearchCriterias.IsUsed).First(m => m.Value  = m_ShowUsedCars.ToString());
To me, this lambda is pretty straight forward. I look up the ceiteria item called IsUsed, and set the value to a local member on my form. But some how it doesnt work. What am I doing wrong? Perhaps there is a better way to do this?