Array elements are accessed using element-access expressions (§7.5.6.1) of the form A[I1,
I2,
...,
IN]
, where A
is an expression of an array type and each IX
is an expression of type int
. The result of an array element access is a variable, namely the array element selected by the indices.
The elements of an array can be enumerated using a foreach
statement (§8.8.4).