Class
IfFunction

Implements the IF function, which evaluates a logical condition and returns one value when TRUE and another when FALSE.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Expressions.Functions

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public class IfFunction : FunctionBase

Inheritance: objectFunctionBaseIfFunction

Inherited Members FunctionBase.Evaluate(FunctionEvaluationContext<RadExpression>)FunctionBase.IsArgumentNumberValid(int)

Constructors

IfFunction()

Initializes a new IF function instance for conditional branching based on boolean evaluation.

Declaration

cs-api-definition
public IfFunction()

Fields

FunctionName

The name of the function.

Declaration

cs-api-definition
public static readonly string FunctionName

Field Value

string

Properties

ArgumentConversionRules

Gets the rules controlling how arguments are converted before evaluation.

Declaration

cs-api-definition
public override ArgumentConversionRules ArgumentConversionRules { get; }

Property Value

ArgumentConversionRules

The argument conversion rules as ArgumentConversionRules.

Overrides FunctionBase.ArgumentConversionRules

FunctionInfo

Gets metadata describing the function's category, description, and argument structure.

Declaration

cs-api-definition
public override FunctionInfo FunctionInfo { get; }

Property Value

FunctionInfo

The function info as FunctionInfo.

Overrides FunctionBase.FunctionInfo

Name

Gets the function name "IF" used in formulas.

Declaration

cs-api-definition
public override string Name { get; }

Property Value

string

The name as String.

Overrides FunctionBase.Name

Methods

EvaluateOverride(FunctionEvaluationContext<RadExpression>)

Evaluates the function by testing the logical condition and returning the corresponding true-branch or false-branch value.

Declaration

cs-api-definition
protected override RadExpression EvaluateOverride(FunctionEvaluationContext<RadExpression> context)

Parameters

context

FunctionEvaluationContext<RadExpression>

The context.

Returns

RadExpression

Function result as RadExpression.

Overrides FunctionBase.EvaluateOverride(FunctionEvaluationContext<RadExpression>)