title: Can I have an incrementing count variable in LINQ?
body: <p>I want to do something like this:</p>
  
  <pre><code>from a in stuff
  let counter = 0
  select new { count = counter++, a.Name };
  </code></pre>
  
  <p>But I get a error telling me that counter is read only. Is there a way to do something similar to this, without declaring a variable outside of the query?</p>
  
  <p>Basically, I just want to show a count/index column in <a href="http://www.linqpad.net/" rel="noreferrer">LINQPad</a> (which is awesome, BTW), which means I can't declare counter ahead of time.</p>