Expression.TypeEqual(Expression, Type) 方法

定义

创建一个比较运行时类型标识的 TypeBinaryExpression

public:
 static System::Linq::Expressions::TypeBinaryExpression ^ TypeEqual(System::Linq::Expressions::Expression ^ expression, Type ^ type);
public static System.Linq.Expressions.TypeBinaryExpression TypeEqual (System.Linq.Expressions.Expression expression, Type type);
static member TypeEqual : System.Linq.Expressions.Expression * Type -> System.Linq.Expressions.TypeBinaryExpression
Public Shared Function TypeEqual (expression As Expression, type As Type) As TypeBinaryExpression

参数

expression
Expression

要将 Expression 属性设置为与其相等的 Expression

type
Type

要将 Type 属性设置为与其相等的 TypeOperand

返回

一个 TypeBinaryExpression,其 NodeType 属性等于 TypeEqual(Expression, Type) 并且 ExpressionTypeOperand 属性设置为指定值。

适用于