使用Guid.NewGuid().GetHashCode()作为种子,可以确保Random在极短时间产生的随机数尽可能做到不重复
Random rand = new Random(Guid.NewGuid().GetHashCode());
int r = rand.Next(1000,10000);
Random rand = new Random(Guid.NewGuid().GetHashCode());
int r = rand.Next(1000,10000);