maztt maztt - 1 year ago 128
C# Question mvc c# random generating same number

how can i generate different number,it is generating the same number

Random rand = new Random(100000);

Answer Source

Just remove the seed number in the constructor. This seed is essentially a number from which the random number list is generated. If you specify a constant number, your random number list will always be the same.

Random rand = new Random();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download