C# While Loop vs For Loop?
<p>In C# a question has been bugging me for a while and its what is that actual major difference between a While and For Loop. Is it just purely readability ie; everything you can essentially do in a for loop can be done in a while loop , just in different places. So take these examples:</p>

<pre><code>int num = 3;
while (num &lt; 10)
{
    Console.WriteLine(num);
    num++;
} 
</code></pre>

<p>vs</p>

<pre><code>for (int x = 3; x &lt; 10; x++)
{
    Console.WriteLine(x);
}
</code></pre>

<p>Both code loops produce the same outcome and is the only difference between the two that the for loop forces you to declare a new variable and also set the iteration value each loop cycle at the start? Maybe I'm missing something else in terms of any major differences but it would good if someone can set me straight regarding this. Thanks.</p>