title: Get the last item in a foreach loop
body: <p>The question is straightforward. How can I get the last item in a <code>foreach</code> loop? Now I know I can find it starting an index and counting the items in the collection, but I was wondering if there is more elegant way?</p>
  
  <pre><code>foreach (var item in Collection)
  {
  }
  </code></pre>