i have defined a method like this:
private String getRadndomNumber(int min, int max) {
Random rnd = new Random((int) DateTime.Now.Ticks & 0x0000FFFF);
return Convert.ToString(rnd.Next(min,max));
}
I am defining both seed and min,max interval , I wanted to know whether the SEED value is of any help here or not ?
tnx 🙂
Seed helps you generate a random number, it’s the base number used for their random algorithm. Using the same seed each time could end up with a predictable set of “random” numbers coming out in sequence.
From the MS documentation:
The default constructor uses the system clock as seed but multiple instances created in the same tick could cause predictable numbers between the generators.