title: Foreach loop, determine which is the last iteration of the loop
body: <p>I have a <code>foreach</code> loop and need to execute some logic when the last item is chosen from the <code>List</code>, e.g.:</p>
  
  <pre><code> foreach (Item result in Model.Results)
   {
        //if current result is the last item in Model.Results
        //then do something in the code
   }
  </code></pre>
  
  <p>Can I know which loop is last without using for loop and counters? </p>