Thursday, November 5, 2015

Truly random

Not only the Random instantiation should happen outside the loop but also use this:

Random rnd = new Random(Guid.NewGuid().GetHashCode());

in favor of Random rnd = new Random();

No comments:

Post a Comment