Class ComparisonOperator
The type of comparison operator to use when validating data.
Inheritance
Namespace: IronXL.DataValidations
Assembly: IronXL.dll
Syntax
public sealed class ComparisonOperator : Enum
ComparisonOperator chooses the test a data validation rule applies to a cell entry, passed to the AddIntegerRule, AddDecimalRule, AddDateRule, and AddTextLengthRule methods on a worksheet's DataValidations. Between and NotBetween check a value against a low and high bound. Equal, NotEqual, GreaterThan, GreaterThanOrEqual, LessThan, and LessThanOrEqual test a single value. This is the data validation operator set, separate from the same-named type in IronXL.Formatting.Enums. The data validation example shows a bounded rule.
sheet.DataValidations.AddIntegerRule("A1:A10", ComparisonOperator.Between, 1, 100);Fields
Between
The value must be between two values.
Declaration
public const ComparisonOperator Between
Field Value
| Type | Description |
|---|---|
| ComparisonOperator |
Equal
The value must be equal to a value.
Declaration
public const ComparisonOperator Equal
Field Value
| Type | Description |
|---|---|
| ComparisonOperator |
GreaterThan
The value must be greater than a value.
Declaration
public const ComparisonOperator GreaterThan
Field Value
| Type | Description |
|---|---|
| ComparisonOperator |
GreaterThanOrEqual
The value must be greater than or equal to a value.
Declaration
public const ComparisonOperator GreaterThanOrEqual
Field Value
| Type | Description |
|---|---|
| ComparisonOperator |
LessThan
The value must be less than a value.
Declaration
public const ComparisonOperator LessThan
Field Value
| Type | Description |
|---|---|
| ComparisonOperator |
LessThanOrEqual
The value must be less than or equal to a value.
Declaration
public const ComparisonOperator LessThanOrEqual
Field Value
| Type | Description |
|---|---|
| ComparisonOperator |
NotBetween
The value must not be between two values.
Declaration
public const ComparisonOperator NotBetween
Field Value
| Type | Description |
|---|---|
| ComparisonOperator |
NotEqual
The value must not be equal to a value.
Declaration
public const ComparisonOperator NotEqual
Field Value
| Type | Description |
|---|---|
| ComparisonOperator |
value__
Declaration
public int value__
Field Value
| Type | Description |
|---|---|
| System.Int32 |