System.Linq.Expressions.Expression.ArrayIndex Method

Creates a System.Linq.Expressions.BinaryExpression that represents applying an array index operator to an array of rank one.

Syntax

public static BinaryExpression ArrayIndex (Expression array, Expression index)

Parameters

array
A System.Linq.Expressions.Expression to set the BinaryExpression.Left property equal to.
index
A System.Linq.Expressions.Expression to set the BinaryExpression.Right property equal to.

Returns

A System.Linq.Expressions.BinaryExpression that has the Expression.NodeType property equal to ExpressionType.ArrayIndex and the BinaryExpression.Left and BinaryExpression.Right properties set to the specified values.

Remarks

index must represent an index of type int.

The BinaryExpression.Method property of the resulting System.Linq.Expressions.BinaryExpression is null, and both BinaryExpression.IsLifted and BinaryExpression.IsLiftedToNull are set to false. The Expression.Type property is equal to the element type of array.Type. The BinaryExpression.Conversion property is null.

Requirements

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