Expression.MakeUnary Expression.MakeUnary Expression.MakeUnary Method

Definition

Creates a UnaryExpression by calling the appropriate factory method.

Overloads

MakeUnary(ExpressionType, Expression, Type) MakeUnary(ExpressionType, Expression, Type) MakeUnary(ExpressionType, Expression, Type)

Creates a UnaryExpression, given an operand, by calling the appropriate factory method.

MakeUnary(ExpressionType, Expression, Type, MethodInfo) MakeUnary(ExpressionType, Expression, Type, MethodInfo) MakeUnary(ExpressionType, Expression, Type, MethodInfo)

Creates a UnaryExpression, given an operand and implementing method, by calling the appropriate factory method.

MakeUnary(ExpressionType, Expression, Type) MakeUnary(ExpressionType, Expression, Type) MakeUnary(ExpressionType, Expression, Type)

Creates a UnaryExpression, given an operand, by calling the appropriate factory method.

public:
 static System::Linq::Expressions::UnaryExpression ^ MakeUnary(System::Linq::Expressions::ExpressionType unaryType, System::Linq::Expressions::Expression ^ operand, Type ^ type);
public static System.Linq.Expressions.UnaryExpression MakeUnary (System.Linq.Expressions.ExpressionType unaryType, System.Linq.Expressions.Expression operand, Type type);
static member MakeUnary : System.Linq.Expressions.ExpressionType * System.Linq.Expressions.Expression * Type -> System.Linq.Expressions.UnaryExpression

Parameters

unaryType
ExpressionType ExpressionType ExpressionType

The ExpressionType that specifies the type of unary operation.

operand
Expression Expression Expression

An Expression that represents the operand.

type
Type Type Type

The Type that specifies the type to be converted to (pass null if not applicable).

Returns

The UnaryExpression that results from calling the appropriate factory method.

Exceptions

unaryType does not correspond to a unary expression node.

Remarks

The unaryType parameter determines which UnaryExpression factory method this method calls. For example, if unaryType is equal to Convert, this method invokes Convert. The typeparameter is ignored if it does not apply to the factory method that is called.

MakeUnary(ExpressionType, Expression, Type, MethodInfo) MakeUnary(ExpressionType, Expression, Type, MethodInfo) MakeUnary(ExpressionType, Expression, Type, MethodInfo)

Creates a UnaryExpression, given an operand and implementing method, by calling the appropriate factory method.

public:
 static System::Linq::Expressions::UnaryExpression ^ MakeUnary(System::Linq::Expressions::ExpressionType unaryType, System::Linq::Expressions::Expression ^ operand, Type ^ type, System::Reflection::MethodInfo ^ method);
public static System.Linq.Expressions.UnaryExpression MakeUnary (System.Linq.Expressions.ExpressionType unaryType, System.Linq.Expressions.Expression operand, Type type, System.Reflection.MethodInfo method);
static member MakeUnary : System.Linq.Expressions.ExpressionType * System.Linq.Expressions.Expression * Type * System.Reflection.MethodInfo -> System.Linq.Expressions.UnaryExpression

Parameters

unaryType
ExpressionType ExpressionType ExpressionType

The ExpressionType that specifies the type of unary operation.

operand
Expression Expression Expression

An Expression that represents the operand.

type
Type Type Type

The Type that specifies the type to be converted to (pass null if not applicable).

method
MethodInfo MethodInfo MethodInfo

The MethodInfo that represents the implementing method.

Returns

The UnaryExpression that results from calling the appropriate factory method.

Exceptions

unaryType does not correspond to a unary expression node.

Remarks

The unaryType parameter determines which UnaryExpression factory method this method calls. For example, if unaryType is equal to Convert, this method invokes Convert. The type and method parameters are ignored if they do not apply to the factory method that is called.

Applies to