You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expression<Func<SomeClass,bool>>myPredicate= x =>x.Prop1=="123";varnegated=Expression.Lambda<Func<SomeClass,bool>>(Expression.Not(myPredicate.Body),myPredicate.Parameters);// negated = x => !(x.Prop == "123");
one could do:
Expression<Func<SomeClass,bool>>myPredicate= x =>x.Prop1=="123";varnegated=myPredicate.Not();// negated = x => !(x.Prop == "123");
The text was updated successfully, but these errors were encountered:
Maybe add a
.Not()
expression extension.Instead of doing:
one could do:
The text was updated successfully, but these errors were encountered: