查了好多资料,都是newid()。可是newid()太慢了,需要等好几分钟
------解决方案--------------------------------------------------------
- C# code
private static int GetNewSeed() { byte[] rndBytes = new byte[4]; RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider(); rng.GetBytes(rndBytes); return BitConverter.ToInt32(rndBytes, 0); }