title: How can I have an index value inside an inner select in a LINQ expression?
body: <p>I have the following:</p>
  
  <pre><code> var ts = _q.GetAll()
         .Where(m =&gt; m.a == 1)
         .Select(m =&gt; new MyClass 
                      {
                      Id = ???,
                      QId = m.q
                      })
         .ToList();
  </code></pre>
  
  <p>How can I make this so that the Id field in MyClass gets an index 
  value starting with 1 and incrementing for each new MyClass Created?</p>
  
  <p>Note that I did try to specify .Select(m, index => etc but this 
  gives me an error.</p>