How can I use a for or while loop with an int declared outside the body?
<p>I have a loop, like so:</p>

<pre><code>        for (i &lt; splitted.Length; i++ != 0)
                {
                    key += '\\' + splitted[i];

                }
</code></pre>

<p>Depending on an if condition above, i, decdlared outside of the loop's body, may need to be incremented (I am splitting a string into a string[] and then need to join parts of it, but maybe from the 5th index, 6th, etc, depending on the condition in the if clause).</p>

<p>However, C# does not let me write a loop like the above. Can I have a loop like the above?</p>

<p>Thanks</p>
