User Tools

Site Tools


expressions

Expression Constants, Operators, and Functions

Constants

Constant Description Example
String constantsWrap string constants in apostrophes.If a string contains an apostrophe, double the apostrophe.[Country] == ‘France’[Name] == ‘O’’Neil
Date-time constantsWrap date-time constants in ‘#’.[OrderDate] >= #2018-03-22 13:18:51.94944#
TrueRepresents the Boolean True value.[InStock] == True
FalseRepresents the Boolean False value.[InStock] == False
EnumerationSpecify an enumeration value using its underlying integer value.
  \\ <font 10.5ptfont-family:/inherit;;#505050;;inherit>You cannot specify an enumeration value using its qualified name. The following criteria</font>**<font 10.5ptfont-family:/inherit;;#404040;;inherit>is incorrect</font>**<font 10.5ptfont-family:/inherit;;#505050;;inherit>:</font> \\
  \\ <font 10.5ptfont-family:Consolas\\/Consolas;;#303030;;inherit>[</font>  <font 10.5ptfont-family:Consolas\\/Consolas;;#2B91AF;;inherit>Status</font>  <font 10.5ptfont-family:Consolas\\/Consolas;;#303030;;inherit>] = Status.InProgress</font>  <font 10.5ptfont-family:/inherit;;#115BC0;;inherit>Use the [EnumProcessingHelper</font>] \\
  \\ ([[https://docs.devexpress.com/CoreLibraries/DevExpress.Data.Filtering.EnumProcessingHelper|https://docs.devexpress.com/CoreLibraries/DevExpress.Data.Filtering.EnumProcessingHelper]]) class’ static methods to register custom enumerations and refer to enumeration values as follows: <font 10.5ptfont-family:Consolas\\/Consolas;;#303030;;inherit>Status =</font>  <font 10.5ptfont-family:\\/inherit;;green;;inherit>##Enum#MyNamespace.Status,InProgress</font># \\

|

Guid

Guid constants in a relational operation with equality or inequality operators only. |[OrderID] == {513724e5-17b7-4ec6-abc4-0eae12c72c1f} |

NumericSpecify different numeric constant types in a string form using suffixes:· Int32 (int) - _1_ · Int16 (short) - _1s_· Byte (byte) - _1b_· Double (double) - _1.0_· Single (float) - _1.0f_· Decimal (decimal) - _1.0m_[Price] == 25.0m
?

( [Region])”) instead. |[Region] != ? |

Operators

Operator Description Example
+Adds the value of one numeric expression to another or concatenates two strings.

LastName ] |

-Finds the difference between two numbers.[Price1] - [Price2]
*Multiplies the value of two expressions.

BonusAmount ]) |

/Divides the first operand by the second.[Quantity] / 2
%Returns the remainder (modulus) obtained by dividing one numeric expression by another.[Quantity] % 3
Performs a bitwise inclusive OR on two numeric expressions. Compares each bit of its first operand to the corresponding bit of its second operand. If either bit is 1, the corresponding resulting bit is set to 1\. Otherwise, the corresponding resulting bit is set to 0.[Number][Number]
&The bitwise AND operator. Compares each bit of its first operand to the corresponding bit of its second operand. If both bits are 1, the corresponding resulting bit is set to 1\. Otherwise, the corresponding resulting bit is set to 0.[Number] & 10
Performs a bitwise exclusive OR on two numeric expressions.[Number][Number]
== =Returns true if both operands have the same value; otherwise, it returns false.[Quantity] == 10
!=Returns true if the operands do not have the same value; otherwise, it returns false.[Country] != ‘France’
«/font>|<font 10.5ptfont-family:/inherit;;#505050;;inherit>Less than operator. Used to compare expressions.[UnitPrice] < 20
Less than or equal to operator. Used to compare expressions.[UnitPrice] ⇐ 20
>=</font></td><td class=/inherit;;#505050;;inherit>Greater than or equal to operator. Used to compare expressions.[UnitPrice] >= 30| | | |<font 10.5ptfont-family:/inherit;#505050;;inherit»</font></td><td class=/inherit;;#505050;;inherit>Greater than operator. Used to compare expressions.[UnitPrice] > 30| | | |<font 10.5ptfont-family:/inherit;;#505050;;inherit>In (,,,)Tests for the existence of a property in an object.[Country] In (‘USA’, ‘UK’, ‘Italy’)
Between (,)Specifies a range to test. Returns true if a value is greater than or equal to the first operand and less than or equal to the second operand.[Quantity] Between (10, 20)
And&&Performs a logical conjunction on two Boolean expressions.

ExtendedPrice ]> 100) [InStock] && ([ ExtendedPrice ]> 100) |

Or Performs a logical disjunction on two Boolean expressions.[Country]==’USA’ Or [Country]==’UK’ [Country]==’USA’ [Country]==’UK’
~|<font 10.5ptfont-family:/inherit;;#505050;;inherit>Performs a bitwise negation on a numeric expression.~[Roles] = 251
Not!Performs a logical negation on a Boolean expression.Not [InStock] ![InStock]
+Returns a numeric expression’s value (a unary operator).+[Value] = 10
-Returns the negative of a numeric expression’s value (a unary operator).-[Value] = 20
Is NullReturns true if an expression is a null reference, the one that does not refer to any object.[Region] is null
expressions.txt · Last modified: 2021/11/11 00:00 (external edit)

Page Tools