title: RandomNumber method returns same number every time called
body: <p>I am trying to generate a different random number every time my RandomNumber method is called from within my for loop. Right now, it returns the same number every time.</p>
  
  <p>This is my RandomNumber method:</p>
  
  <pre><code>    private int RandomNumber(int min, int max)
      {
          Random random = new Random();
          return random.Next(min, max);
      }
  </code></pre>
  
  <p>This is the context I am using it in: (it's a little messy just because I have been messing with trying to get it to work....)</p>
  
  <pre><code>        for (int i = 0; i &lt; charsRaw.Length; i++)
          {
              int max = charsRaw.Length - 1;
              int rand = 0;
              rand = RandomNumber(0, max);
  
              charsNew[i] = charsRaw[rand];
              text2 += charsNew[i];
  
           }
  </code></pre>
  
  <p>I can't seem to get it to return a different value every time it is called with the for loop.</p>
  
  <p>Although, when i stick a MessageBox.Show(rand.ToString()) after text2 += charsNew[i], it gives me a different value every time and works the way I intended it to. Strange.</p>
  
  <p>Thanks!
  Eric</p>