﻿# Getting involved in dumb arguments...of when 'for' and 'foreach' can lead to idiocy...

<datetime class="hidden">2004-02-29T00:00</datetime>
<!-- category -- mostlylucidcouk, Imported, C#, Performance -->

I do have a tendency to get involved in pointless arguments in the [ASP.NET Forums](http://www,asp.net)...a good example is [this one](http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&amp;PostID=418593), arguing about the performance of 'foreach' versus 'for'...any opinions from here - the crux of my argument is that for() will in general perform better than foreach() - because the generated IL simply does far less in most cases (I am aware of some optimisations which reduce the benefit for very simple collections).