How long does the stream of Random().Next() take until it repeats?
问题 Consider the .NET Random stream: var r = new Random(); while (true) { r.Next(); } How long does it take to repeat? 回答1: According to the documentation: Pseudo-random numbers are chosen with equal probability from a finite set of numbers. The chosen numbers are not completely random because a definite mathematical algorithm is used to select them, but they are sufficiently random for practical purposes. The current implementation of the Random class is based on Donald E. Knuth's subtractive