IntegerConditionExpression
Table of Contents
What it is
IntegerConditionExpression is used to evaluate a Integer property (of field or variable). Depending on the outcome, the result will then be either Integer1 or Integer2.
- See LINQ for details about LINQ and the AI-Framework.
- Go to the category for all LINQ expressions.
Code example
public IntegerProperty IntegerExample1 => IntegerProperty(description: "first example");
public IntegerProperty IntegerExample2 => IntegerProperty(description: "second example");
public ReadOnlyIntegerProperty IntegerResult
{
get
{
return CalculatedIntegerProperty(() =>
IntegerExample1.IsEqualTo(IntegerExample2).IsTrueElse(IntegerExample1, IntegerExample2));
}
}
Explanation of the example
Line 9 evaluates if IntegerExample1 is equal to IntegerExample2.
If so, IntegerExample1 will be assigned to the CalculatedIntegerProperty IntegerResult, otherwise IntegerExample2 will be assigned to IntegerResult.