7.5.6 Element access
An element-access consists of a primary-no-array-creation-expression, followed by a "
[" token, followed by an expression-list, followed by a "
]" token. The expression-list consists of one or more expressions, separated by commas.
- primary-no-array-creation-expression [ expression-list ]
expression-list , expression
If the primary-no-array-creation-expression of an element-access is a value of an array-type, the element-access is an array access (Section 18.104.22.168). Otherwise, the primary-no-array-creation-expression must be a variable or value of a class, struct, or interface type that has one or more indexer members, in which case the element-access is an indexer access (Section 22.214.171.124).