Share via


Model.If Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Returns the second or third argument, depending on whether the condition is true.

Namespace:  Microsoft.SolverFoundation.Services
Assembly:  Microsoft.Solver.Foundation (in Microsoft.Solver.Foundation.dll)

Syntax

'Declaration
Public Shared Function If ( _
    condition As Term, _
    resultTrue As Term, _
    resultFalse As Term _
) As Term
public static Term If(
    Term condition,
    Term resultTrue,
    Term resultFalse
)
public:
static Term^ If(
    Term^ condition, 
    Term^ resultTrue, 
    Term^ resultFalse
)
static member If : 
        condition:Term * 
        resultTrue:Term * 
        resultFalse:Term -> Term 
public static function If(
    condition : Term, 
    resultTrue : Term, 
    resultFalse : Term
) : Term

Parameters

Return Value

Type: Microsoft.SolverFoundation.Services.Term
The second input is returned if condition is true; otherwise, the third input is returned.

Exceptions

Exception Condition
ArgumentException

The operation is not valid for the given inputs.

Remarks

This is a trinary operation.

.NET Framework Security

See Also

Reference

Model Class

Microsoft.SolverFoundation.Services Namespace