Is It Ever Good Practice To Modify The Index Variable Inside a FOR Loop?
<p>Given the code:</p>

<pre><code>for (int i = 1; i &lt;= 5; i++)
        {
            // Do work
        }
</code></pre>

<p>Is is ever acceptable to change the value of <code>i</code> from within the loop?
For example:</p>

<pre><code>for (int i = 1; i &lt;= 5; i++)
        {
            if( i == 2)
            {
               i = 4;
            }
            // Do work
        }
</code></pre>
