<p>I'm trying to get the following bit of code to work in LINQPad but am unable to index into a var. Anybody know how to index into a var in LINQ?</p>

<pre><code>string[] sa = {"one", "two", "three"};
sa[1].Dump();

var va = sa.Select( (a,i) =&gt; new {Line = a, Index = i});
va[1].Dump();
// Cannot apply indexing with [] to an expression of type 'System.Collections.Generic.IEnumerable&lt;AnonymousType#1&gt;'
</code></pre>

As the comment says, you cannot apply indexing with
```
[]
```
to an expression of type
```
System.Collections.Generic.IEnumerable<T>
```
. The IEnumerable interface only supports the method
```
GetEnumerator()
```
. However with LINQ you can call the extension method
```
ElementAt(int)
```
.