System.Linq.Expressions.Expression.PreIncrementAssign C# (CSharp) Method

PreIncrementAssign() public static method

Creates a UnaryExpression that increments the expression by 1 and assigns the result back to the expression.
public static PreIncrementAssign ( Expression expression ) : UnaryExpression
expression Expression An to apply the operations on.
return UnaryExpression
        public static UnaryExpression PreIncrementAssign(Expression expression)
        {
            return MakeOpAssignUnary(ExpressionType.PreIncrementAssign, expression, method: null);
        }

Same methods

Expression::PreIncrementAssign ( Expression expression, MethodInfo method ) : UnaryExpression

Usage Example

            public Expr ToExpression()
            {
                var exitLabel = Expr.Label();
                var loopBody  = Expr.Block(Body.ToExpression(), Expr.PreIncrementAssign(Iterator.ToExpression()));

                return(Expr.Loop(Expr.IfThenElse(Expr.LessThan(Iterator.ToExpression(), UpperBound.ToExpression()), loopBody, Expr.Break(exitLabel)), exitLabel));
            }
All Usage Examples Of System.Linq.Expressions.Expression::PreIncrementAssign
Expression