System.Linq.Expressions.UnaryExpression Class

Represents an expression that has a unary operator.

See Also: UnaryExpression Members

Syntax

[System.Diagnostics.DebuggerTypeProxy(typeof(System.Linq.Expressions.Expression/UnaryExpressionProxy))]
public sealed class UnaryExpression : Expression

Remarks

The following table summarizes the factory methods that can be used to create a System.Linq.Expressions.UnaryExpression that has a specific node type.

ExpressionType.ArrayLength

Expression.ArrayLength(Expression)

ExpressionType.Convert

erload:System.Linq.Expressions.Expression.Convert

ExpressionType.ConvertChecked

erload:System.Linq.Expressions.Expression.ConvertChecked

ExpressionType.Negate

erload:System.Linq.Expressions.Expression.Negate

ExpressionType.NegateChecked

erload:System.Linq.Expressions.Expression.NegateChecked

ExpressionType.Not

erload:System.Linq.Expressions.Expression.Not

ExpressionType.Quote

Expression.Quote(Expression)

ExpressionType.TypeAs

Expression.TypeAs(Expression, Type)

ExpressionType.UnaryPlus

erload:System.Linq.Expressions.Expression.UnaryPlus

In addition, the erload:System.Linq.Expressions.Expression.MakeUnary methods can also be used to create a System.Linq.Expressions.UnaryExpression. These factory methods can be used to create a System.Linq.Expressions.UnaryExpression of any node type that represents a unary operation. The parameter of these methods that is of type Expression.NodeType specifies the desired node type.

Requirements

Namespace: System.Linq.Expressions
Assembly: System.Core (in System.Core.dll)
Assembly Versions: 3.5.0.0, 4.0.0.0