title: Random function returns the same number repeatedly
body: <p>I have a really weird problem in vb.net, for some reason system.random() is not being random at all in any of my functions:</p>
  
  <pre><code>Public Function RandomNumber(ByVal MaxNumber As Integer, Optional ByVal MinNumber As Integer = 0) As Integer
  
          Dim R As System.Random = New System.Random()
          If MinNumber &gt; MaxNumber Then
              Dim T As Integer = MinNumber
              MinNumber = MaxNumber
              MaxNumber = T
          End If
          Return R.Next(MinNumber, MaxNumber)
      End Function
  </code></pre>
  
  <p>Here is result after calling exactly 9 times</p>
  
  <pre><code>4
  4
  4
  3
  3
  3
  3
  3
  3
  </code></pre>