How does a 1-10 simple number generator work?

Edited 3 Years Ago by silvercats

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 3 Years Ago 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 3 Years Ago by tinstaafl

This article has been dead for over six months. Start a new discussion instead.