c# - LINQ multiple and or condition -


im having trouble multiple and/or linq query

current error "&& cannot applied bool , datetime"

is there better way this? think may need check nulls on of too

thanks

(d.development != 1 && d.deleted != 1 && d.stock != 1) && (d.decommissiondate = convert.todatetime("1900-01-01"))  

the second part doesn't convert boolean:

(d.decommissiondate = convert.todatetime("1900-01-01")) 

= assignment operator. when done, try compare boolean datetime. if intent compare decommissiondate, use == instead. if want assign it, need on separate occasion.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -