Random Number

B

Barry

I am looking for the best way to produce a totally random
number in VB.NET with no pre-defined sequence does
anybody know if using Randomize followed by rnd is
sufficient enough?
 
H

Herfried K. Wagner [MVP]

* "Barry said:
I am looking for the best way to produce a totally random
number in VB.NET with no pre-defined sequence does
anybody know if using Randomize followed by rnd is
sufficient enough?

It's /impossible/ to get a "totally random" number.
 
H

Herfried K. Wagner [MVP]

* "Cor said:
Not anymore, just connect interupts from your hamster to it.

I'll set up a commercial web service. 2 Euro-Cents/random number.

;-)
 
C

Cor

Hi Herfried,

LOL

There was someone in this newsgroups who asked millions from that and then a
lot of times.
You will be rich in future.
I'll set up a commercial web service. 2 Euro-Cents/random number.

:))

Cor
 
H

Herfried K. Wagner [MVP]

* "Cor said:
There was someone in this newsgroups who asked millions from that and then a
lot of times.
You will be rich in future.

I won't have time to post to the groups any more...

;->>>
 
T

Tom Leylan

Barry said:
I am looking for the best way to produce a totally random
number in VB.NET with no pre-defined sequence does
anybody know if using Randomize followed by rnd is
sufficient enough?

Barry: The need for random numbers and the solutions for implementing them
have both been around for decades. If you search Google for "random number
generation" you will find hundreds of sites with explanations, code, and
everything else you could possibly want to know on the subject.

In a nutshell however whether the RNG available to you in .Net is random
enough depends entirely upon what you intend to do with the values. For
heavy-duty mathematical studies it is apparently not random "enough" but if
you are trying to roll some dice in a game it is good enough. If you are
creating software for the state lottery you should probably choose another
algorithm but (as you will see if you read some of the articles) every
algorithm has it's drawbacks (and consequently it's particularly specialized
uses.)

Tom
 
T

Tom Spink

New > Project > WebService.....

Roll Up, Roll UP!! Herfried K. Wagner Randomly Random Number generator,
takes two arguments:

Public Shared Function GetRandomNumber(intCreditCardNumber As Integer,
intMaximum As Integer)

--
HTH,
-- Tom Spink, Über Geek

Woe be the day VBC.EXE says, "OrElse what?"

Please respond to the newsgroup,
so all can benefit
 
H

Herfried K. Wagner [MVP]

* "Tom Spink said:
New > Project > WebService.....

Roll Up, Roll UP!! Herfried K. Wagner Randomly Random Number generator,
takes two arguments:

Public Shared Function GetRandomNumber(intCreditCardNumber As Integer,
intMaximum As Integer)

If you implement the web service for me, you will get 3.5% of the money
I earn with the web service.

SCNR
 

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

Top