Confused with random number function

  • Thread starter Thread starter Les2011
  • Start date Start date
L

Les2011

Guest
Hi,

I am trying to use the random number function and the documentation I found is not clear. I want to generate numbers from 2 to 5 and this is what I am using


b1 = rn.Next(2, 5)

But this generated numbers from 2 to 5. The documents I have read say this will generate numbers BETWEEN 2 and 5 yet mine generates 2 through 4?? 2 is not BETWEEN so I am confused. If someone can shine light as to how this function actually performs I would appreciate it.

Thanks

Les


Continue reading...
 
Back
Top