Expression.ArrayLength Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Creates a UnaryExpression that represents an expression for obtaining the length of a one-dimensional array.
Assembly: System.Core (in System.Core.dll)
Parameters
- array
- Type: System.Linq.Expressions.Expression
An Expression to set the Operand property equal to.
Return Value
Type: System.Linq.Expressions.UnaryExpressionA UnaryExpression that has the NodeType property equal to ArrayLength and the Operand property equal to array.
| Exception | Condition |
|---|---|
| ArgumentNullException | array is Nothing. |
| ArgumentException | array.Type does not represent an array type. |
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 Nothing, and both IsLifted and IsLiftedToNull are set to false.