new Random() uses the current time as the starting value. Thus, if you call this function several times in a very short period of time, it can return the same value. Here's an explanation from MSDN :
The initial default value is derived from the system clock and has a final resolution. As a result, various Random objects that are created in close sequence when the default constructor is called will have the same initial default values โโand, therefore, will create the same sets of random numbers. This problem can be avoided by using one random object to generate all random numbers.
Heinzi
source share