title: Random number generator always picks the same value when run inside a loop
body: <p>The problem with the code is, when I try to generate a number, if the spin is equal 1 it generates values inside range (1,2,3) if if try to use the loop to sum random values inside the same range the random number gerated is always the same while in loop,</p>
  
  <p>example, if I run the loop with:
  spind3 = 4 the values go from    4, 8, 12
  spind3 = 5 the values go from    5, 10, 15</p>
  
  <p>That means the first time the RandomNumber generates a value inside loop, it never change until the loop completes.</p>
  
  <pre><code>if (toggled3.Checked)
     {
      if (spind3.Value != 1)
          {           
           for (int i = 1; i &lt;= spind3.Value; i++)
                {
                 diceCalc[1] += RandomNumber(1, 4);
                }
          }
       else
       diceCalc[1] = RandomNumber(1, 4);
       }
  </code></pre>