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


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Creates an IndexExpression to access a multidimensional array.

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

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


Type: System.Linq.Expressions::Expression^

An expression that represents the multidimensional array.

Type: System.Collections.Generic::IEnumerable<Expression^>^

An IEnumerable<T> containing 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.

The following code example shows how to change the value of an element in a multidimensional array 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