<?xml version="1.0"?>
<clause number="14.5.6" title="Element access">
  <paragraph>An <non_terminal where="14.5.6">element-access</non_terminal> consists of a <non_terminal where="14.5">primary-no-array-creation-expression</non_terminal>, followed by a &quot;[&quot; token, followed by an <non_terminal where="14.5.6">expression-list</non_terminal>, followed by a &quot;]&quot; token. The <non_terminal where="14.5.6">expression-list</non_terminal> consists of one or more expressions, separated by commas. <grammar_production><name><non_terminal where="14.5.6">element-access</non_terminal></name> : <rhs><non_terminal where="14.5">primary-no-array-creation-expression</non_terminal><terminal>[</terminal><non_terminal where="14.5.6">expression-list</non_terminal><terminal>]</terminal></rhs></grammar_production><grammar_production><name><non_terminal where="14.5.6">expression-list</non_terminal></name> : <rhs><non_terminal where="14.14">expression</non_terminal></rhs><rhs><non_terminal where="14.5.6">expression-list</non_terminal><terminal>,</terminal><non_terminal where="14.14">expression</non_terminal></rhs></grammar_production></paragraph>
  <paragraph>If the <non_terminal where="14.5">primary-no-array-creation-expression</non_terminal> of an <non_terminal where="14.5.6">element-access</non_terminal> is a value of an <non_terminal where="19.1">array-type</non_terminal>, the  <non_terminal where="14.5.6">element-access</non_terminal> is an array access (<hyperlink>14.5.6.1</hyperlink>). Otherwise, the <non_terminal where="14.5">primary-no-array-creation-expression</non_terminal> must be a variable or value of a class, struct, or interface type that has one or more indexer members, in which case the <non_terminal where="14.5.6">element-access</non_terminal> is an indexer access (<hyperlink>14.5.6.2</hyperlink>). </paragraph>
</clause>
