Random number

  • Thread starter Thread starter Nikolay Petrov
  • Start date Start date
How to generate random number between range of integers?

TIA

Check out the Random class and the Random.Next and its overloads

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 
Nikolay Petrov said:
How to generate random number between range of integers?

\\\
Dim generator As New Random()
Dim randomValue As Integer
randomValue = generator.Next(1, 5)
///
 
Thanks Herfried

Herfried K. Wagner said:
\\\
Dim generator As New Random()
Dim randomValue As Integer
randomValue = generator.Next(1, 5)
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top