思想:根据GUID获得种子,然后获得随机数,这个是完全随机的
static int GetRandomNumber(int min, int max) { int rtn = 0; Random r = new Random(); byte[] buffer = Guid.NewGuid().ToByteArray(); int iSeed = BitConverter.ToInt32(buffer, 0); r = new Random(iSeed); rtn = r.Next(min, max + 1); return rtn; }