Szerkesztés

Megosztás a következőn keresztül:


Expression.MakeUnary Method

Definition

Creates a UnaryExpression by calling the appropriate factory method.

Overloads

MakeUnary(ExpressionType, Expression, Type)

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

MakeUnary(ExpressionType, Expression, Type, MethodInfo)

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

MakeUnary(ExpressionType, Expression, Type)

Source:
UnaryExpression.cs
Source:
UnaryExpression.cs
Source:
UnaryExpression.cs

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
Public Shared Function MakeUnary (unaryType As ExpressionType, operand As Expression, type As Type) As UnaryExpression

Parameters

unaryType
ExpressionType

The ExpressionType that specifies the type of unary operation.

operand
Expression

An Expression that represents the operand.

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

operand is null.

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.

Applies to

MakeUnary(ExpressionType, Expression, Type, MethodInfo)

Source:
UnaryExpression.cs
Source:
UnaryExpression.cs
Source:
UnaryExpression.cs

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);
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
Public Shared Function MakeUnary (unaryType As ExpressionType, operand As Expression, type As Type, method As MethodInfo) As UnaryExpression

Parameters

unaryType
ExpressionType

The ExpressionType that specifies the type of unary operation.

operand
Expression

An Expression that represents the operand.

type
Type

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

method
MethodInfo

The MethodInfo that represents the implementing method.

Returns

The UnaryExpression that results from calling the appropriate factory method.

Exceptions

operand is null.

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