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
for has more simple logic to implement so it's faster than foreach.