Skip to main content

BetweenOperator Class

An operator which determines whether a criteria expression lies between the specified range of values.

Namespace: DevExpress.Data.Filtering

Assembly: DevExpress.Data.v22.1.dll

Declaration

public sealed class BetweenOperator :
    CriteriaOperator

The following members return BetweenOperator objects:

Remarks

The BetweenOperator can be used to build criteria expressions when filtering objects. To learn more, see Simplified Criteria Syntax and Criteria Operators.

To create a between operator, create a new instance of the BetweenOperator class. The constructor’s parameters allow the lower and upper values in the range to be specified.

Note

The upper and lower values in the range are included in the range.

Example

This sample code selects customers who are older than 20 years and younger than 30.

The image below shows the result:

BetweenOperatorSample

using DevExpress.Xpo;
using DevExpress.Data.Filtering;

// ...

CriteriaOperator filter = new BetweenOperator("Age", 20, 30);
xpCustomers.Filter = filter;

The following code snippets (auto-collected from DevExpress Examples) contain references to the BetweenOperator class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Inheritance

Object
CriteriaOperator
BetweenOperator
See Also