title: IEnumerable.Select with index
body: <p>I have the following code:</p>
  
  <pre><code> var accidents = text.Skip(NumberOfAccidentsLine + 1).Take(numberOfAccidentsInFile).ToArray();
  </code></pre>
  
  <p>where accidents is an array of strings.</p>
  
  <p>I want to make a Linq transformation from the string array to an array of Accident objects as follows:</p>
  
  <pre><code> return accidents.Select(t =&gt; new Accident() {Id = i, Name = t.Replace("\"", string.Empty)}).ToArray();
  </code></pre>
  
  <p>How do I retrieve the index i from the accidents array using Linq or do I have to go old school?  </p>