title: Why should I use foreach instead of for (int i=0; i<length; i++) in loops?
body: <p>It seems like the cool way of looping in C# and Java is to use foreach instead of C style for loops. </p>
  
  <p>Is there a reason why I should prefer this style over the C style?  </p>
  
  <p>I'm particularly interested in these two cases, but please address as many cases as you need to explain your points.</p>
  
  <ul>
  <li>I wish to perform an operation on each item in a list.</li>
  <li>I am searching for an item in a list, and wish to exit when that item is found.</li>
  </ul>