Author: imperialx | Posted on: 10/8/2008 6:02:54 PM | Views : 431

 Hello,
         Why I can't get a unique value from using the Random class below?


Result:
5 4 1 2 4 <<<-------one value keep repeating itself twice or more
 
-----

        Dim RandomClass As New Random()
        Dim RandomNumber As Integer
        Dim s As New StringBuilder

        For index As Integer = 1 To 5
            RandomNumber = RandomClass.Next(1, 5)

            s.Append(RandomNumber & " ")
        Next

      &nb ...

Go to the complete details ...