Bewerken

Delen via


Expression.ArrayLength(Expression) Method

Definition

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

public:
 static System::Linq::Expressions::UnaryExpression ^ ArrayLength(System::Linq::Expressions::Expression ^ array);
public static System.Linq.Expressions.UnaryExpression ArrayLength (System.Linq.Expressions.Expression array);
static member ArrayLength : System.Linq.Expressions.Expression -> System.Linq.Expressions.UnaryExpression
Public Shared Function ArrayLength (array As Expression) As UnaryExpression

Parameters

array
Expression

An Expression to set the Operand property equal to.

Returns

A UnaryExpression that has the NodeType property equal to ArrayLength and the Operand property equal to array.

Exceptions

array is null.

array.Type does not represent an array type.

Remarks

The Type property of array must represent an array type.

The Type property of the resulting UnaryExpression is equal to Int32. The Method property is null, and both IsLifted and IsLiftedToNull are set to false.

Applies to