Expression.MakeUnary Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
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
parameter 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.
- 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.