Skip to main content
A newer version of this page is available. .

BetweenOperator Class

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

Namespace: DevExpress.Data.Filtering

Assembly: DevExpress.Data.v18.2.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 Creating Criteria 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 snippet (auto-collected from DevExpress Examples) contains a reference 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