mrblah mrblah - 3 months ago 9
C# Question

How to loop through a collection that supports IEnumerable?

How to loop through a collection that supports IEnumerable?

Answer

A regular for each will do:

foreach (var item in collection)
{
    // do your stuff   
}
Comments