In C#/VB.NET/.NET, which loop runs faster, for or foreach?
for
foreach
Ever since I read that a for loop works faster than a foreach
This is ridiculous. There's no compelling reason to ban the for-loop, performance-wise or other.
See Jon Skeet's blog for a performance benchmark and other arguments.