5 Years
Discussion Span
Last Post by Michael27

This article is a good start.
The most common method used in computer laguages is called the linear congruential method.
Something with multiplication of a seed and modulo a big prime number.
But hey, I'm lazy so all I do if I want a number between 1 and 10:
Random Rnd = new Random();
int numb = Rnd.Next(1,11);


Exactly, I am asking what is inside the Random(); fucntion.

Edited by silvercats


Actually it's right in the MSDN article on the Random Class

The current implementation of the Random class is based on Donald E. Knuth's subtractive random number generator algorithm. For more information, see D. E. Knuth. "The Art of Computer Programming, volume 2: Seminumerical Algorithms". Addison-Wesley, Reading, MA, second edition, 1981.

Then a simple search on google yielded this thread

Edited by tinstaafl

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.