- Arithmetic Operations
- Assign Expression
- Comparison Expression
- Conditional Expression
- Exception Expression
- Iteration Expression
- Jump Expression
- Logical Expression
- Member Expression
- Operators Expression
Expression Tree Tutorial GreaterThanOrEqual
You can build an expression tree which contains a "greater than or equal" numeric comparison using Expression.GreaterThanOrEqual
method. For example, you have the following code.
bool value = 31 >= 31; Console.WriteLine(value);
Here is the code that is required to build the same functionality using expression tree.
Expression expr = Expression.GreaterThanOrEqual( Expression.Constant(31), Expression.Constant(31) ); Console.WriteLine(Expression.Lambda<Func<bool>>(expr).Compile()());