Infoborders Community Management (CM) Scenarios use dynamic expressions for syntax. The information provided here describes the syntax supported by Dynamic Expressions.
- From the the null literal to any reference type or nullable type.
- From an integer literal to an integral type or real type provided the number is within the range of that type.
- From a real literal to a real type provided the number is within the range of that type.
- From a string literal to an enum type provided the string literal contains the name of a member of that enum type.
- From a source type that is assignment compatible with the target type according to the Type.IsAssignableFrom method in .NET.
- From a non-nullable value type to the nullable form of that value type.
- From a numeric type to another numeric type with greater range.
- Between two types provided Type.IsAssignableFrom is true in one or both directions.
- Between two types provided one or both are interface types.
- Between the nullable and non-nullable forms of any value type.
- Between any two types belonging to the set consisting of SByte, Byte, Int16, UInt16, Int32, UInt32, Int64, UInt64, Decimal, Single, Double, Char, any enum type, as well as the nullable forms of those types.
Category |
Expression |
Description |
Primary |
x.m |
Instance field or instance property access. Any public field or property can be accessed. |
x.m(…) |
Instance method invocation. The method must be public and must be declared in an accessible type. |
|
x[…] |
Array or indexer access. Multi-dimensional arrays are not supported. |
|
T.m |
Static field or static property access. Any public field or property can be accessed. |
|
T.m(…) |
Static method invocation. The method must be public and must be declared in an accessible type. |
|
T(…) |
Explicit conversion or constructor invocation. Note thatnew is not required in front of a constructor invocation. |
|
new(…) |
Data object initializer. This construct can be used to perform dynamic projections. |
|
it |
Current instance. Incontexts where members of a current object are implicitly in scope, it is used to refer to the entire object itself. |
|
x(…) |
Dynamic lambda invocation. Used to reference another dynamic lambda expression. |
|
iif(x, y, z) |
Conditional expression. Alternate syntax for x ? y : z. |
|
Unary |
-x |
Negation. Supported types are Int32, Int64, Decimal,Single, and Double. |
!x not x |
Logical negation. Operand must be of type Boolean. |
|
Multiplicative |
x * y |
Multiplication. Supported types are Int32, UInt32, Int64,UInt64, Decimal, Single, and Double. |
x / y |
Division. Supported types are Int32, UInt32, Int64,UInt64, Decimal, Single, and Double. |
|
x % y x mod y |
Remainder. Supported types are Int32, UInt32, Int64,UInt64, Decimal, Single, and Double. |
|
Additive |
x + y |
Addition or string concatenation. Performs string concatenation if either operand is of type String. Otherwise, performs addition for the supported typesInt32, UInt32, Int64, UInt64, Decimal, Single, Double,DateTime, and TimeSpan. |
x – y |
Subtraction. Supported types are Int32, UInt32, Int64,UInt64, Decimal, Single, Double, DateTime, andTimeSpan. |
|
x & y |
String concatenation. Operands may be of any type. |
|
Relational |
x = y x == y |
Equal. Supported for reference types and the primitive types. Assignment is not supported. |
x != y x <> y |
Not equal. Supported for reference types and the primitive types. |
|
x < y |
Less than. Supported for all primitive types exceptBoolean, Object and Guid. |
|
x > y |
Greater than. Supported for all primitive types exceptBoolean, Object and Guid. |
|
x <= y |
Less than or equal. Supported for all primitive types except Boolean, Object and Guid. |
|
x >= y |
Greater than or equal. Supported forall primitive types except Boolean, Object and Guid. |
|
Logical AND |
x && y x and y |
Logical AND. Operands must be of type Boolean. |
Logical OR |
x || y x or y |
Logical OR. Operands must be of type Boolean. |
Conditional |
x ? y : z |
Evaluates y if x is true, evaluates z if x is false. |
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article