C#static Expression<Func<A, bool>> GetExpression(bool admin)
{
Expression<Func<A, bool>> predicate = admin ? (x => true) : (x => x.Position == 1);
return predicate;
}
class A
{
public int Position { get; set; }
}
Refactorings - The “Make Implicit” refactoring shouldn’t be available when a variable is initialized by a target-typed conditional expression
Answers approved by DevExpress Support
We have addressed the issue described in this ticket and will include a fix in our next maintenance update. Should you need to apply our fix prior to official release, you can request a hotfix here.
Note: Hotfixes may be unavailable for betas/updates set for release within a week.
- v20.2.9Download Official Update