System.Linq.Expressions.Expression.ArrayLength Method

Creates a System.Linq.Expressions.UnaryExpression that represents an expression for obtaining the length of a one-dimensional array.

Syntax

public static UnaryExpression ArrayLength (Expression array)

Parameters

array
An System.Linq.Expressions.Expression to set the UnaryExpression.Operand property equal to.

Returns

A System.Linq.Expressions.UnaryExpression that has the Expression.NodeType property equal to ExpressionType.ArrayLength and the UnaryExpression.Operand property equal to array.

Remarks

The Expression.Type property of array must represent an array type.

The Expression.Type property of the resulting System.Linq.Expressions.UnaryExpression is equal to int. The UnaryExpression.Method property is null, and both UnaryExpression.IsLifted and UnaryExpression.IsLiftedToNull are set to false.

Requirements

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