title: How can you determine the current items position whilst looping through the collection?
body: <p>How can you determine the current items position whilst looping through the collection?</p>
  
  <p>I'm working through decision data, grouped by each client, but I have some business logic which depends on the "position" in the set, i.e. 1st, 2nd, 3rd, etc. in conjunction with other properties of the record, e.g. <em>if it's the 3rd decision about a client and their rating in the instance is A then ...</em> </p>
  
  <pre><code>var multiples = from d in context.Decision_Data
                  group d by d.Client_No
                      into c
                      where c.Count() &gt; 1
                      select c;
  
  foreach (var grouping in multiples)
  {
      foreach (var item in grouping)
      {
          // business logic here for processing each decision for a Client_No
          // BUT depends on item position ... 1st, 2nd, etc.
      }
  </code></pre>
  
  <p><strong>UPDATE:</strong> I appreciate I could put a counter in and manually increment, but it feels <em>wrong</em> and I'd of thought there was <em>something</em> in .NET to handle this ??</p>