title: What is the most efficient loop in c#
body: <p>There are a number of different way to accomplish the same simple loop though the items of an  object in c#. </p>
  
  <p>This has made me wonder if there is any reason be it performance or ease of use, as to use on over the other. Or is it just down to personal preference. </p>
  
  <p>Take a simple object </p>
  
  <pre><code>var myList = List&lt;MyObject&gt;; 
  </code></pre>
  
  <p>Lets assume the object is filled and we want to iterate over the items. </p>
  
  <p>Method 1.</p>
  
  <pre><code>foreach(var item in myList) 
  {
     //Do stuff
  }
  </code></pre>
  
  <p>Method 2 </p>
  
  <pre><code>myList.Foreach(ml =&gt; 
  {
     //Do stuff
  });
  </code></pre>
  
  <p>Method 3 </p>
  
  <pre><code>while (myList.MoveNext()) 
  {
    //Do stuff
  }
  </code></pre>
  
  <p>Method 4 </p>
  
  <pre><code>for (int i = 0; i &lt; myList.Count; i++)
  {
    //Do stuff   
  }
  </code></pre>
  
  <p>What I was wondering is do each of these compiled down to the same thing? is there a clear performance advantage for using one over the others?</p>
  
  <p>or is this just down to personal preference when coding?</p>
  
  <p>Have I missed any?</p>