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

Rule:  6@101Checked automatically with code checker

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


Description:

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.