System.Linq.Expressions.Expression.Quote Method

Creates a System.Linq.Expressions.UnaryExpression that represents an expression that has a constant value of type System.Linq.Expressions.Expression.

Syntax

public static UnaryExpression Quote (Expression expression)

Parameters

expression
An System.Linq.Expressions.Expression to set the UnaryExpression.Operand property equal to.

Returns

A System.Linq.Expressions.UnaryExpression that has the Expression.NodeType property equal to ExpressionType.Quote and the UnaryExpression.Operand property set to the specified value.

Remarks

The Expression.Type property of the resulting System.Linq.Expressions.UnaryExpression represents the constructed type System.Linq.Expressions.Expression`1, where the type argument is the type represented by expression.Type. The UnaryExpression.Method property is null. Both UnaryExpression.IsLifted and UnaryExpression.IsLiftedToNull are false.

Requirements

Namespace: System.Linq.Expressions
Assembly: System.Core (in System.Core.dll)
Assembly Versions: 3.5.0.0, 4.0.0.0