title: How does one create a .NET Expression with NodeType of ExpressionType.Index?
body: <p>I'm writing code that evaluates .NET <code>Expression</code> trees.  I'm trying to create a C# 4 test to exercise my handling of an <code>ExpressionType.Index</code>, but I can't figure out how to create that type of expression through a <code>LambdaExpression</code>.  No matter what I try, the expression comes out as an <code>ExpressionType.Call</code> or <code>ExpressionType.ArrayIndex</code>.  For example:</p>
  
  <pre><code>IList&lt;int&gt; myList = new ObservableCollection&lt;int&gt; { 3, 56, 8 };
  Expression&lt;Func&lt;int&gt;&gt; myExpression = () =&gt; myList[3]; 
  // myExpression.Body.NodeType == ExpressionType.Call
  
  myList = new int[] { 3, 56, 8 };
  myExpression = () =&gt; myList[3]; 
  // myExpression.Body.NodeType == ExpressionType.Call
  
  int[] myArray = new int[] { 3, 56, 8 };
  myExpression = () =&gt; myArray[3]; 
  // myExpression.Body.NodeType == ExpressionType.ArrayIndex
  
  List&lt;int&gt; myNonInterfaceList = new List&lt;int&gt; { 3, 7, 4, 2 };
  myExpression = () =&gt; myNonInterfaceList[3]; 
  // myExpression.Body.NodeType == ExpressionType.Call
  </code></pre>
  
  <p>What is an <code>IndexExpression</code>, and can one be created through an inline <code>LambdaExpression</code> in C# 4?</p>