Expression.Condition Method (Expression, Expression, Expression, Type)
Creates a ConditionalExpression that represents a conditional statement.
Assemblies: System.Core (in System.Core.dll)
System.Linq.Expressions (in System.Linq.Expressions.dll)
static member Condition : test:Expression * ifTrue:Expression * ifFalse:Expression * type:Type -> ConditionalExpression
This method allows explicitly unifying the result type of the conditional expression in cases where the types of ifTrue and ifFalse expressions are not equal. Types of both ifTrue and ifFalse must be implicitly reference assignable to the result type. The type is allowed to be Void.