There are a number of different way to accomplish the same simple loop though the items of an object in c#.

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.

Take a simple object

var myList = List<MyObject>; 

Lets assume the object is filled and we want to iterate over the items.

Method 1.

foreach(var item in myList) 
{
   //Do stuff
}

Method 2

myList.Foreach(ml => 
{
   //Do stuff
});

Method 3

while (myList.MoveNext()) 
{
  //Do stuff
}

Method 4

for (int i = 0; i < myList.Count; i++)
{
  //Do stuff   
}

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?

or is this just down to personal preference when coding?

Have I missed any?

Edit
Report