Skip to main content
.NET Framework 4.5.2+

XPBaseObject.Evaluate(String) Method

Evaluates the specified string expression against the current instance of the persistent object.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v24.1.dll

NuGet Package: DevExpress.Xpo

Declaration

public object Evaluate(
    string expression
)

Parameters

Name Type Description
expression String

A string that specifies the expression to evaluate.

Returns

Type Description
Object

A value evaluated.

Remarks

This method allows you to evaluate a specific expression against the current instance of the persistent object.

In the expression parameter, you can use numerous functions and arithmetic and logic operators. These are the same functions and operators that are encapsulated by the CriteriaOperator class’ descendants. For instance, if a persistent object contains fields ‘A’ and ‘B’ you can use the “(A+B)*(A+B)” expression to calculate the sum of these fields squared.

See Also