Use ConditionalExpression instead of IfStatement.