Rediger

Del via


Expression.Quote(Expression) Method

Definition

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

public:
 static System::Linq::Expressions::UnaryExpression ^ Quote(System::Linq::Expressions::Expression ^ expression);
public static System.Linq.Expressions.UnaryExpression Quote (System.Linq.Expressions.Expression expression);
static member Quote : System.Linq.Expressions.Expression -> System.Linq.Expressions.UnaryExpression
Public Shared Function Quote (expression As Expression) As UnaryExpression

Parameters

expression
Expression

An Expression to set the Operand property equal to.

Returns

A UnaryExpression that has the NodeType property equal to Quote and the Operand property set to the specified value.

Exceptions

expression is null.

Remarks

The Type property of the resulting UnaryExpression represents the constructed type Expression<TDelegate>, where the type argument is the type represented by expression.Type. The Method property is null. Both IsLifted and IsLiftedToNull are false.

Applies to