TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
C# Coding Standard

Rule:  6@101Checked automatically with code checker

Synopsis:Do not change a loop variable inside a for loop block
Severity Level:2
Category:Control flow


Updating the loop variable within the loop body is generally considered confusing, even more so if the loop variable is modified in more than one place. This rule also applies to foreach loops.