I had a little dispute (which was very close to holy war:) ) with my colleage, about the performance of access to list via indeces VS via enumerator. To operat
I suspect there is a performance gain in employing for instead of foreach (at least for primitive types). As far as I know they are nearly equivalent if you perform for and foreach over the same array (not any other structure like lists, this creates some overheads by itself).
The performance of foreach and for depends on which type of structure you are running for and foreach.
Please check; For and Foreach comparison