The thing you have to understand is that Random isn't truly random. It's actually a pseudo random number generator - which means that the numbers are generated based off a statistical algorithm (in this case, it's a version of Donald Knuth's algorithm). If you start from the same seed number every time, then you generate the same sequence every time. Internally, the seed for the Random class is based on the system clock, but if Random instances are created sufficiently close together the same value will be picked up.

You have two real choices here:

1. Use the same instance of Random (don't recreate it in this method every time).

2. Use the parameterised Random constructor and pass in the tick count - enough ticks will have elapsed between calls (unless you are running in multiple threads where it can't be guaranteed) to generate a new seed.

15,882,658 members

--SA