Expression::ArrayAccess Method (Expression^, array<Expression^>^)


Creates an IndexExpression to access an array.

Namespace:   System.Linq.Expressions
Assembly:  System.Core (in System.Core.dll)

static IndexExpression^ ArrayAccess(
	Expression^ array,
	... array<Expression^>^ indexes


Type: System.Linq.Expressions::Expression^

An expression representing the array to index.

Type: array<System.Linq.Expressions::Expression^>^

An array that contains expressions used to index the array.

The expression that represents the array can be obtained by using the MakeMemberAccess method, or through NewArrayBounds or NewArrayInit.

For multidimensional arrays, use the ArrayAccess method.

The following code example shows how to change a value of an array element by using the ArrayAccess method.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Available since 4.0
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top