score:14

Accepted answer

you need to use == and not =:

var tmpa = correctselections.where(opt => opt.selected == true);

so when you search for condition, you were setting values. this is a common mistake, i fall for it as well :)

score:0

change = to == in your linq code.

score:4

you want opt.selected == true. you have a single =

score:7

your line

opt => opt.selected = true

needs another equals sign:

opt => opt.selected == true

Related Query

More Query from same tag