title: for all/for each looping through a Delphi TCollection?
body: <p>Does Delphi provide any nice way to iterate over TCollectionItems in a TCollection? </p>
  
  <p>Something, perhaps, along the lines of...</p>
  
  <pre><code>for mycollectionitem in mycollection.Items do
    mycollectionitem.setWhatever();
  </code></pre>
  
  <p>That doesn't compile though</p>
  
  <p>or is there really nothing I can do that's more elegant than this:</p>
  
  <pre><code>for num := 1 to mycollection.Count do
    mycollection.Items[num-1].setWhatever();
  </code></pre>